Search found 4 matches

by mrbeatnik
Thu Aug 11, 2005 10:35 am
Forum: PHP - Code
Topic: explode is not exploding as it should! [SOLVED]
Replies: 7
Views: 308

SOLVED!

echo '<pre>'.htmlentities(var_export($mess,true),ENT_QUOTES).'</pre>'; Produces: '<message from=\'blah@blah.com\' to=\'blah1@blah.com\' id=\'1345\' type=\'chat\'><body>just testing</body><x xmlns=\'jabber:x:event\'><composing/></x></message>' As I thought, the <body> tags are still being caught, so...
by mrbeatnik
Thu Aug 11, 2005 9:12 am
Forum: PHP - Code
Topic: explode is not exploding as it should! [SOLVED]
Replies: 7
Views: 308

I'm convinced that the space is not being used as "normal", since it can correctly explode the string that uses the "1" other than " "(space). When I echo the $mess, it gives it exactly as it should be. Of course, the webpage doesn't always display special chars (\t). I...
by mrbeatnik
Thu Aug 11, 2005 9:08 am
Forum: PHP - Code
Topic: problem
Replies: 3
Views: 165

You could have a second array, marking the amount of times used. array1(msg1, msg2, msg3) array2(0,0,0) Depending on the position, you can check the amount of times used. //get random word finder number //some code to give: $i=3; if(array2[$i]==0){ //~pull out word (msg3 for example). $msg=array1[$i...
by mrbeatnik
Thu Aug 11, 2005 8:58 am
Forum: PHP - Code
Topic: explode is not exploding as it should! [SOLVED]
Replies: 7
Views: 308

explode is not exploding as it should! [SOLVED]

Hi all. Hope you can help, this is driving me crazy... Working: Hard coded string. $mess="just testing"; $p1mess = explode(' ', $mess); This works fine, resulting in: $mess = just testing $p1mess[0] = just $p1mess[1] = testing Not Working: String passed in packet. $mess=$this->frominc; //(...