benaust Posted June 27, 2008 Share Posted June 27, 2008 Spry PHP Explode Hi there guys; I am using DreamWeaver, I have an XML file that I use Adobe Spry to read this back. One of the nodes has a data in it that I have implode data in there like so "70||1207290213||Agility||Abdominals||Agility Ladder||ex_26_a.jpg" When retrieving data using spry I can not explode this so I can have 70 1207290213 Agility ... ... ex_26_a.jpg Is there a way to do this? I appreciate any help Thanks Link to comment https://forums.phpfreaks.com/topic/112143-spry-php-explode/ Share on other sites More sharing options...
mrbuter Posted June 27, 2008 Share Posted June 27, 2008 I dont really understand the question. Are you trying to explode using php? With that you would do $var = "70||1207290213||Agility||Abdominals||Agility Ladder||ex_26_a.jpg" $exploded = explode("||", $var) $exploded[1] --> 70 $exploded[2] --> 1207290213 ..etc. or was that not your question? lol. Link to comment https://forums.phpfreaks.com/topic/112143-spry-php-explode/#findComment-575717 Share on other sites More sharing options...
benaust Posted June 27, 2008 Author Share Posted June 27, 2008 Yes this I have done, but I am not sure why it is not doing it. I have set it out to be read in string. But it still does not. I did This: var ds1 = new Spry.Data.XMLDataSet("t_38_1208181878.xml", "Program/ProgramsTasks",{useCache:false}); <div spry:repeat="ds1"> <?PHP $ThisVariable = "{Tasks}"; $ThisChunk = explode("||", $ThisVariable ); echo "Chunk 1 = $ThisChunk[0]"; echo "Chunk 2 = $ThisChunk[1]"; echo "Chunk 3 = $ThisChunk[2]"; ?> </div> Output is: Chunk 1 = 70||1207290213||Agility||Abdominals||Agility Ladder||ex_26_a.jpg Chunk 2 = Chunk 3 = I have also tried: $ThisVariable = {Tasks}; This is the Error I get Parse error: syntax error, unexpected '{' in /home/virtualw/public_html/trainers/trainer_panel/Trainer_DailyProgEL_PDF.php on line 83 Link to comment https://forums.phpfreaks.com/topic/112143-spry-php-explode/#findComment-575841 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.