I have an array that looks like the example below. How to I get only the value in the first line (the audio file path)? I have already tried array_rand() which only gives me values letter by letter. Sorry if this has been answered before, couldn't find anything myself. Thanks in advance.
Array
(
[0] => path/to/audiofile.mp3
3500440
audio/mpeg
[1] => path/to/anotheraudiofile.mp3
5661582
audio/mpeg
...
)
Edit: var_dump gives me this:
array(2) {
[0]=>
string(98) "path/to/audiofile.mp3
3500440
audio/mpeg
"
[1]=>
string(95) "path/to/anotheraudiofile.mp3
5661582
audio/mpeg
"
}
var_dump, not aprint_r$array[0]only returns the first line, or you only see the first line? What system are you running this code on (windows, Linux, OSX or *NIX)? what doesstrlentell you? More info would be nice<br>HTML code?