Re: [PHP] explode didn't work well

2002-10-31 Thread Rasmus Lerdorf
Because you can't spell pizza, I bet. 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 result isn't displaying > anything > I tried the example from document its its not showing > anything, pls point out where i went wro

[PHP] explode didn't work well

2002-10-31 Thread ppf
Hi all: I had tried to split the string into an array of string using explode but the result isn't displaying anything I tried the example from document its its not showing anything, pls point out where i went wrong ** $pizaa="piece1 piece2 piece3 piece4 piece5 piece6"; $piece

Re: [PHP] Explode and Trim

2002-04-05 Thread Joshua E Minnie
; > Sincerely, > > Maxim Maletsky > Founder, Chief Developer > > PHPBeginner.com (Where PHP Begins) > [EMAIL PROTECTED] > www.phpbeginner.com > > > > -Original Message- > > From: Joshua E Minnie [mailto:[EMAIL PROTECTED]] > > Sent: Friday, April 05, 2

Re: [PHP] Explode and Trim

2002-04-05 Thread Joshua E Minnie
D] > www.phpbeginner.com > > > > -Original 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

RE: [PHP] Explode and Trim

2002-04-04 Thread Maxim Maletsky
---Original 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 seem

[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() - 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&

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

[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? (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

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 "$val"; } -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 n

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 $mysql_result_s

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 va

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

2002-02-19 Thread Rick Emery
: Baloo :0) [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=$ro

[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

[PHP] Explode Your Business!

2001-08-15 Thread Customer Service

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 Pt

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

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

[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[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

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: [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 > > test > > $n

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 > > test > > $nam

RE: [PHP] explode

2001-06-24 Thread Jason Murray
> How come I get this it does not make since Makes perfect sense: test 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 "name=what+ever" and sets $name = "what e

[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 test $name1=explode("+",$name); $fname=$name1[0] ;

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")

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);

[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

[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 additio

[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 arra

Re: [PHP] explode question

2001-03-07 Thread Chris Lee
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. 250.376.2690 fx. 250.554.1120 [EMAIL PROTECTED] ""Rol"" <[E

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

[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 a variable into each character

2001-02-23 Thread Philip Olson
If $string is a string, like : $string = '312'; Then one can do : $string[0]; // 3 $string[1]; // 1 $string[2]; // 2 Note, '312' is a string and will work using above but if we define 312 as an integer like : $string = 312; Then $string[0] will not "work" and it'll need to

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 M

[PHP] Explode a variable into each character

2001-02-23 Thread Brandon Orther
Hello, 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? Thank you, Brandon Orther WebIntellects Design/Dev

<    1   2