Jump to content

setting up a loop from explode result


cleary1981

Recommended Posts

hi,

 

I have a script that passes a list like this $$8$$7$$88$$12$$1$$19$$

I am using explode to get the values from this list. The problem I am having is I want to create a for loop to process these values but he length of the list can vary. Is there anyway of working out how many times the loop should run?

 

$quotelist = $_REQUEST['quotelist'];
$p = explode("$$", $quotelist);
for($i=1;$i<?????;$i = $i++){
//(process info)
}

Link to comment
https://forums.phpfreaks.com/topic/137023-setting-up-a-loop-from-explode-result/
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.