Jump to content

help with implode


MDanz

Recommended Posts

@OP

$words = implode(" ", $itemid);

echo count($itemid);

 

Would also work.

 

@Pikachu

For the purpose of this function, 'word' is defined as a locale dependent  string containing alphabetic characters, which also may contain, but not start  with "'" and "-" characters.

 

Array ( [2] => 17 [3] => 15 [4] => 17 )

Link to comment
https://forums.phpfreaks.com/topic/217131-help-with-implode/#findComment-1127686
Share on other sites

thanks for the help.

 

could i have help on this.

 

 

$oldarray = implode(" ", $itemid);

$newarray = explode(" ", $oldarray);

i have to do the above to reset the array index to start at zero.

 

how do i set a session array for $newarray? 

 

e.g. $newarray = 13 14 15

 

so i want the  session array to be

[0] =>13
[1] =>14
[2] =>15

 

 

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/217131-help-with-implode/#findComment-1127688
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.