Re: [PHP] explode didn't work well

2002-10-31 Thread Keith Vance
echo ($pieces[2]); instead of echo ($pieces [2]); Keith Vance Vance Consulting LLC www.vanceconsulting.net (206) 355-2399 Try U.M.A. at http://uma.sourceforge.net/ On Thu, 31 Oct 2002, ppf wrote: Hi all: I had tried to split the string into an array of string using explode but the

Re: [PHP] explode didn't work well

2002-10-31 Thread Keith Vance
And that too. Keith Vance Vance Consulting LLC www.vanceconsulting.net (206) 355-2399 Try U.M.A. at http://uma.sourceforge.net/ On Thu, 31 Oct 2002, Rasmus Lerdorf wrote: Because you can't spell pizza, I bet. On Thu, 31 Oct 2002, ppf wrote: Hi all: I had tried to split the string

Re: [PHP] Explode and Trim

2002-04-05 Thread Joshua E Minnie
] Subject: [PHP] Explode and Trim I am parsing through a text file and using explode to convert the string to an array. The problem seems to be at the end of the string, when I check to see if the last element in the array is empty it tells me that it is not. The problem comes because

Re: [PHP] Explode and Trim

2002-04-05 Thread Joshua E Minnie
Message- From: Joshua E Minnie [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:07 AM To: [EMAIL PROTECTED] Subject: [PHP] Explode and Trim I am parsing through a text file and using explode to convert the string to an array. The problem seems to be at the end of the string

[PHP] Explode and Trim

2002-04-04 Thread Joshua E Minnie
I am parsing through a text file and using explode to convert the string to an array. The problem seems to be at the end of the string, when I check to see if the last element in the array is empty it tells me that it is not. The problem comes because the last element should be empty because all

RE: [PHP] Explode and Trim

2002-04-04 Thread Maxim Maletsky
- From: Joshua E Minnie [mailto:[EMAIL PROTECTED]] Sent: Friday, April 05, 2002 1:07 AM To: [EMAIL PROTECTED] Subject: [PHP] Explode and Trim I am parsing through a text file and using explode to convert the string to an array. The problem seems to be at the end of the string, when I check

[PHP] explode() - quick question

2002-03-13 Thread Phil Schwarzmann
Im trying to take this string, hello, and explode it into an array with each cell in the array containing one character. $array[0] = 'h' $array[1] = 'e' etc.. How does this work? When is use... $character = explode('', $string) or $character = explode($string) ...it doesn't seem to work.

Re: [PHP] explode() - quick question

2002-03-13 Thread Analysis Solutions
On Wed, Mar 13, 2002 at 10:06:01PM -0500, Phil Schwarzmann wrote: $array[0] = 'h' $array[1] = 'e' $character = explode('', $string) or You need to explode the array: $character = explode('', $array); --Dan -- PHP scripts that make your job easier

RE: [PHP] explode() - quick question

2002-03-13 Thread Martin Towell
just use $string{0} and $string{1} , etc. note the type of brackets -Original Message- From: Phil Schwarzmann [mailto:[EMAIL PROTECTED]] Sent: Thursday, March 14, 2002 2:06 PM To: [EMAIL PROTECTED] Subject: [PHP] explode() - quick question Im trying to take this string, hello

[PHP] explode? (table field to a variable of same name)

2002-02-19 Thread Baloo :0\)
How can I assign automatically all fields of a database to a variable of the same name? Instead of having to manually do $user_id=$row[user_id]; etc Then how could I know the number of fields in the table so I can do a loop to print them all in html? In advance, thanks for your help. Alfredo

RE: [PHP] explode? (table field to a variable of same name)

2002-02-19 Thread Rick Emery
) [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 19, 2002 3:41 PM To: [EMAIL PROTECTED] Subject: [PHP] explode? (table field to a variable of same name) How can I assign automatically all fields of a database to a variable of the same name? Instead of having to manually do $user_id=$row[user_id

Re: [PHP] explode? (table field to a variable of same name)

2002-02-19 Thread Simon Willison
First grab an associative array of the variables from the database with mysql_fetch_array() Then use extract($array); to extract all of the variables in the array to the symbol table: www.php.net/extract Simon Baloo :0) wrote: How can I assign automatically all fields of a database to a

Re: [PHP] explode? (table field to a variable of same name)

2002-02-19 Thread Christopher William Wesley
This may not be what you want to do, but should give you some hints. (This is my code which I use to simply dump any SQL table into an HTML table I can view in a browser ... for small tables, of course.) Using MySQL as an example: // assuming you ran a query and stored results in

Re: [PHP] explode? (table field to a variable of same name)

2002-02-19 Thread Rasmus Lerdorf
This creates all the variables you asked for and also prints each one in a column of a table. foreach($row as $key=$val) { $$key = $val; echo td$val/td; } -Rasmus On Tue, 19 Feb 2002, Baloo :0) wrote: How can I assign automatically all fields of a database to a variable of the same

Re: [PHP] explode? (table field to a variable of same name)

2002-02-19 Thread Christopher William Wesley
oi ... typo! see below. sorry :( ~Chris On Tue, 19 Feb 2002, Christopher William Wesley wrote: This may not be what you want to do, but should give you some hints. (This is my code which I use to simply dump any SQL table into an HTML table I can view in a browser ... for small

[PHP] Explode Your Business!

2001-08-15 Thread Customer Service

[PHP] explode()

2001-07-16 Thread Adam Plocher
$reqmonth = ${explode(-,$row[5])}[1]; Is there anyway I can get that to work without having to use multiple lines of code?

Re: [PHP] explode()

2001-07-16 Thread Zak Greant
list (,$reqmonth) = explode ('-', $row[5]); --zak - Original Message - From: Adam Plocher [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 16, 2001 5:23 PM Subject: [PHP] explode() $reqmonth = ${explode(-,$row[5])}[1]; Is there anyway I can get that to work without having

Re: [PHP] explode()

2001-07-16 Thread Mark Maggelet
On Mon, 16 Jul 2001 16:23:19 -0700, Adam Plocher ([EMAIL PROTECTED]) wrote: $reqmonth = ${explode(-,$row[5])}[1]; Is there anyway I can get that to work without having to use multiple lines of code? hmm... how about $reqmonth = array_pop(explode(-,$row[5],2)); -- PHP General Mailing List

Re: [PHP] explode()

2001-07-16 Thread Brian White
$arr = explode(-,$row[5]); $reqmonth=$arr[1]; Well, it's all on one line. At 16:23 16/07/2001 -0700, Adam Plocher wrote: $reqmonth = ${}[1]; Is there anyway I can get that to work without having to use multiple lines of code? - Brian White Step Two Designs Pty Ltd

[PHP] explode

2001-06-24 Thread Richard Kurth
Question about explode this work just perfect $name=what+ever; $name1=explode(+,$name); $fname=$name1[0] ;this has what $lname=$name1[0] ;this has ever But if I pass the info from another page like this a href=whatever.php?name=what+evertest/a

RE: [PHP] explode

2001-06-24 Thread Jason Murray
How come I get this it does not make since Makes perfect sense: a href=whatever.php?name=what+evertest/a Web browsers url encode form elements. If you use a href link like this, you need to do the URL encoding yourself. A + happens to be a space, in URL encoding. So, PHP receives

Re: [PHP] explode

2001-06-24 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] (Richard Kurth) wrote: $name=what+ever; $name1=explode(+,$name); $fname=$name1[0] ;this has what $lname=$name1[0] ;this has ever But if I pass the info from another page like this a

Re: [PHP] explode

2001-06-24 Thread Zak Greant
Richard Kurth wrote: Question about explode this work just perfect $name=what+ever; $name1=explode(+,$name); $fname=$name1[0] ;this has what $lname=$name1[0] ;this has ever But if I pass the info from another page like this a

Re: [PHP] explode

2001-06-24 Thread nicole
if you need to pass special characters (eg. +) in the url, you need to use a url encoding function like rawurlencode().. or choose another delimeter which can be passed in the url like these -_. s Richard Kurth wrote: Question about explode this work just perfect $name=what+ever;

Re[2]: [PHP] explode

2001-06-24 Thread Richard Kurth
I figured out how to do it. Buy the way I am not the one passing the variables like this this is how it is sent from a credit card company when they send the customer back to my page. I am just trying to capture that data so the customer does not have to put it in twice nicole if you need

[PHP] explode won't explode

2001-04-27 Thread Tom Beidler
I have the following code that doesn't seem to explode. I'm trying to make a field that looks like 21,23,25,27 or small,medium,large,x-large into a pulldown menu with the individual item broken out. if (($size != ) ($size != n/a)) { $sizearry = explode(,, $size); while (list($key,$value)

Re: [PHP] explode won't explode

2001-04-27 Thread jdwright
Hiya, I have the following code that doesn't seem to explode. I'm trying to make a field that looks like 21,23,25,27 or small,medium,large,x-large into a pulldown menu with the individual item broken out. if (($size != ) ($size != n/a)) { $sizearry = explode(,, $size); while

Re: [PHP] explode won't explode

2001-04-27 Thread Christian Reiniger
On Friday 27 April 2001 14:15, Tom Beidler wrote: I have the following code that doesn't seem to explode. I'm trying to make a field that looks like 21,23,25,27 or small,medium,large,x-large into a pulldown menu with the individual item broken out. if (($size != ) ($size != n/a)) {

[PHP] Explode

2001-03-23 Thread Randy Johnson
How would I use to explode to extract the following "name address city state zip" I want to break that up and then do this if (empty($name)) if (empty($address) thanks randy -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For

[PHP] explode question

2001-03-07 Thread Rol
Hello all, I would like to check some names ( @ seperated strings) with this global $PHP_AUTH_USER I first do $arrLoginName = explode("@", $row-usr_loginName); How can I construct a loop which stops and returns true if a match is found? Any hints would be great. Many thanks Roland

Re: [PHP] explode question

2001-03-07 Thread Jason Murray
Rol wrote: Hello all, I would like to check some names ( @ seperated strings) with this global $PHP_AUTH_USER I first do $arrLoginName = explode("@", $row-usr_loginName); How can I construct a loop which stops and returns true if a match is found? Any hints would be great.

Re: [PHP] explode question

2001-03-07 Thread Chris Lee
?php function check() { $arrLoginName = explode("@", $row-usr_loginName); foreach($arrLoginName as $pos = $val) if (match) return 1; return ; } ? is this what you mean? please post regarding. -- Chris Lee Mediawaveonline.com ph. 250.377.1095 ph.

[PHP] explode question

2001-03-07 Thread Rol
Hello again, I'd better explain better. I have logon screen Header("WWW-Authenticate: Basic realm=\"whatever\""); where I would like the compare the user name $PHP_AUTH_USER with the one in my database All names like Mike or mike are @ seperated strings How can I check the names from this

Re: [PHP] Explode a variable into each character

2001-02-23 Thread Rasmus Lerdorf
I have a string of 1034 and I want to have an array that has each number in an element.(ex: num[0] = 1, num[1] = 0, num[2] = 3 num[3] = 4) Is there a way to explode a string by each character? Just convert it to a string: ie. $foo = (string)$num; echo $foo[1]; -Rasmus -- PHP General

<    1   2