[PHP] exploding

2004-08-25 Thread Jake McHenry
Hi everyone. Is there a way to explode by every character in the variable? Example: $var = "8"; $test = explode("", $var); output would be $test[0] = 0; $test[1] = 0; $test[2] = 0; $test[3] = 0; $test[4] = 8; Can I get an array like that? Thanks, Jake McHenry MIS Coordinator Nittany

Re: [PHP] exploding strings

2002-11-20 Thread Ernest E Vogelsinger
At 05:54 20.11.2002, Michael P. Carel said: [snip] >Hi to all, > >I have a problem regarding exploding string. I want to explode string >sepated by "+" sign, but i want it also the first variable in the array be >distinc in terms of collor or whatever when v

[PHP] exploding strings

2002-11-19 Thread Michael P. Carel
Hi to all, I have a problem regarding exploding string. I want to explode string sepated by "+" sign, but i want it also the first variable in the array be distinc in terms of collor or whatever when viewed in the page. ex. $no=("1+2+3"); $number=explode("+", $no); how could i echo $no with th

[PHP] exploding values into new variables

2002-10-28 Thread Petre Agenbag
Hi The manual states: $pizza = "piece1 piece2 piece3 piece4 piece5 piece6"; $pieces = explode(" ", $pizza); So, if I want to be able to echo piece1 to the screen at a later stage, I would go: echo $pieces[0]; or $first_piece = $pieces[0]; echo $first_piece; Right? Just want to make sure I un

Re: [PHP] Exploding Zip Codes! (Using PHP's explode function)

2002-08-12 Thread Analysis & Solutions
On Mon, Aug 12, 2002 at 01:29:38PM -0700, Keith Posehn wrote: > > | 36310 ABBEVILLE | > | 35440 ABERNANT | > | 35005 ADAMSVILLE | Look at http://www.php.net/manual/en/function.fgetcsv.php. Use Example 1, substituting " " as your "delimiter" argument and your file name in lieu of "tes

[PHP] Exploding Zip Codes! (Using PHP's explode function)

2002-08-12 Thread Keith Posehn
I have a huge block of zip codes I need to seperate into their constituent parts for a query of a database. The block looks like this (in part): | 36310 ABBEVILLE | | 35440 ABERNANT | | 35005 ADAMSVILLE | | 35540 ADDISON | | 35006 ADGER | | 35441 AKRON | I need to use eplode (p