Jump to content

Counting how many times explode()


avo

Recommended Posts

Hi all

How can i count the amount of splits the explode() function as made

example
[quote]$var="one,two,three,four"
$temp=explode ("," ,$var);

echo $temp[1];
echo $temp[2];
echo $temp[3];
echo $temp[4];[/quote]

now we know it as split four times but how can i count this please.

THanks in advance
Link to comment
https://forums.phpfreaks.com/topic/13496-counting-how-many-times-explode/
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.