RE: [PHP] explode(" ", $pizza)

2003-02-25 Thread Tim
The following example illustrates the use of the split method.

function SplitDemo(){
   var s, ss;
   var s = "The rain in Spain falls mainly in the plain.";
   // Split at each space character.
   ss = s.split(" ");
   return(ss);
}

HTH
t.


> -Message d'origine-
> De : John Taylor-Johnston [mailto:[EMAIL PROTECTED]
> Envoye : mardi 25 fevrier 2003 07:22
> A : [EMAIL PROTECTED]
> Objet : [PHP] explode(" ", $pizza)
> 
> 
> Off topic :) ?
> Anyone know how to explode using javascript?
> 
> $pieces = explode(" ", $pizza);
> 
> John
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] explode(" ", $pizza)

2003-02-25 Thread Sascha Braun
Hi,

i found something like:

var s = "This,is,a,String";
lenght = s.lenght;
document.write(s.bold());
t = s.substring(2,4);
a = s.split(","); // This line is the most interesting one ;))

document.write(a[1]); // should write the word 'is'

Dont know if it works, i just looked in one of my old books.

The Book where i found the answer is from O'Reilly: Javascript
the defenetive reference or some like that, another very very good
book is Dynamic HTML from O'Reilly, you should find all infor-
mation you need there.

Good luck!

Sascha

- Original Message - 
From: "John Taylor-Johnston" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, February 25, 2003 7:21 AM
Subject: [PHP] explode(" ", $pizza)


> Off topic :) ?
> Anyone know how to explode using javascript?
> 
> $pieces = explode(" ", $pizza);
> 
> John
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] explode(" ", $pizza)

2003-02-24 Thread John Taylor-Johnston
Off topic :) ?
Anyone know how to explode using javascript?

$pieces = explode(" ", $pizza);

John


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php