Jump to content

help with a foreach


dod

Recommended Posts

here my function

function select($array){

$last_item = end($array);

$last_item = each($array);

reset($array);

foreach($array as $key => $value){

$returnValue .= $value.',';  $value;

}

return($returnValue);

}

 

i need $returnValue to be a string for the site or it will not work and also fr the last item to not have a comma

 

Link to comment
https://forums.phpfreaks.com/topic/185932-help-with-a-foreach/#findComment-981956
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.