Jump to content

explode


canadabeeau

Recommended Posts

Hi again,

I have some code which splits a string at a delimeter

$images = explode(";", $images);

Now this code then loops and alters as necessary

		for ($i = 0, $len = strlen($images); $i < $len; $i++) { 
		echo 'AAA'.$images{$i};
	}

 

The only problem is after the last array it adds two sets of AAA (so AAAAAA) how can I stop it doing this?

 

$images = image1.jpg;image2.jpg

Link to comment
https://forums.phpfreaks.com/topic/195184-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.