parsing PHP result from web using itemdel

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Contact:

parsing PHP result from web using itemdel

Post by reelstuff » Sun Oct 11, 2009 1:06 am

I am trying to parse some PHP code like this,

Code: Select all

echo $valid."::".$install."::".$active;
I tried to set the itemdel to "::" but got error, in fact I tried several and could not get it to chunk right,

any suggestions on how to get the values, into three lines,

right now it is, 1::1::1

some how I have to get it like this
1
1
1

then I can get each line and value

thanks in advance for any suggestions,

rabit
Posts: 40
Joined: Wed May 31, 2006 8:30 am

Post by rabit » Sun Oct 11, 2009 1:41 am

put "1::1::1" into tStr

replace "::" with comma in tStr

repeat for each item thisItem in tStr
put thisItem & return after tList
end repeat

delete char -1 of tList



Cheers

Ralf

reelstuff
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 254
Joined: Mon Apr 16, 2007 12:06 am
Contact:

Post by reelstuff » Sun Oct 11, 2009 2:14 am

rabit wrote:put "1::1::1" into tStr

replace "::" with comma in tStr

repeat for each item thisItem in tStr
put thisItem & return after tList
end repeat

delete char -1 of tList



Cheers

Ralf
Thank you I really appreciate that, worked perfectly, I had been doing php all day and just could not get my brain to reboot into rev script, thanks again.

Post Reply