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
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
;
> 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
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
---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
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
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&
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
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
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
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
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
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
: 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
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
$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
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 (,$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
$reqmonth = ${explode("-",$row[5])}[1];
Is there anyway I can get that to work without having to use multiple lines
of code?
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
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
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
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
> 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
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] ;
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")
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);
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
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
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
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
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
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
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
> 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
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
101 - 137 of 137 matches
Mail list logo