For first value in $var do something...


I think it is subarray.. like - $entry_array[ 'entry' ] .. So t3od0r how to choose the first or any other value.. And btw the values are actually all entries/pages of content.

I think if($entry_array[ 'entry' ][0]) works but if i want to do this ---

if($entry_array[ 'entry' ][0]){$entry_array[ 'entry' ][0]=$entry_array[ 'entry' ][0].'TEST';}
it adds 'TEST' to all entries not the first one...(maybe because the code like this means 'if exist'?)
Porsche_maniak Reviewed by Porsche_maniak on . How would you translate this in PHP ? For first value in $var do something... I think it is subarray.. like - $entry_array .. So t3od0r how to choose the first or any other value.. And btw the values are actually all entries/pages of content. I think if($entry_array) works but if i want to do this --- if($entry_array){$entry_array=$entry_array.'TEST';} it adds 'TEST' to all entries not the first one...(maybe because the code like this means 'if exist'?) Rating: 5