Re: [PHP] 2d array help

2002-01-21 Thread Kurth Bemis


Yes I do...
for an online billing system...

Kurth Bemis
Senior Network Admin/Owner: USAExpress.net
Owner: Ozone Computer

http://kurth.hardcrypto.com
PGP Key Avail.
-
Uh!.Uh!.Uh!."I'm done with this."...Out the window

On Mon, 21 Jan 2002, Jim Lucas [php] wrote:

> $result = mysql_query( "SELECT pkgid FROM plans");
> while($row = mysql_fetch_assoc($result))
> {
> $package = mysql_fetch_assoc(mysql_query( "SELECT * FROM plans WHERE
> pkgid='$row[pkgid]'"));
> }
> obviously this will have
>
> $package = array("key" => "value", ...);
>
> are you wanting to have the above be referanced by the pkgid ?
>
> Jim Lucas
> bend.com
> - Original Message -
> From: <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, January 21, 2002 2:51 PM
> Subject: [PHP] 2d array help
>
>
> > arg- trying to get the data that I pull outta my db into a 2d assoc
> array...
> >
> > any help?
> >
> > ~kurth
> >
> > $result = mysql_query( "SELECT pkgid FROM plans");
> > while($row = mysql_fetch_assoc($result)){
> > $resultpkg = mysql_query( "SELECT * FROM plans WHERE
> > pkgid='$row[pkgid]'");
> > $package = mysql_fetch_assoc($resultpkg);
> > }
> >
> > print_r($plan);
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 2d array help

2002-01-21 Thread Jim Lucas [php]

$result = mysql_query( "SELECT pkgid FROM plans");
while($row = mysql_fetch_assoc($result))
{
$package = mysql_fetch_assoc(mysql_query( "SELECT * FROM plans WHERE
pkgid='$row[pkgid]'"));
}
obviously this will have

$package = array("key" => "value", ...);

are you wanting to have the above be referanced by the pkgid ?

Jim Lucas
bend.com
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, January 21, 2002 2:51 PM
Subject: [PHP] 2d array help


> arg- trying to get the data that I pull outta my db into a 2d assoc
array...
>
> any help?
>
> ~kurth
>
> $result = mysql_query( "SELECT pkgid FROM plans");
> while($row = mysql_fetch_assoc($result)){
> $resultpkg = mysql_query( "SELECT * FROM plans WHERE
> pkgid='$row[pkgid]'");
> $package = mysql_fetch_assoc($resultpkg);
> }
>
> print_r($plan);
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 2d array help

2002-01-21 Thread Erik Price

I'm not sure exactly what you need help with, but if you're getting any 
errors, I'd recommend adding the resource identifier to your mysql_* 
functions (usually ($db = mysql_connect(), but YMMV).

But I wonder if you were trying to do something else?


Erik


On Monday, January 21, 2002, at 05:51  PM, <[EMAIL PROTECTED]> wrote:

> arg- trying to get the data that I pull outta my db into a 2d assoc 
> array...
>
> any help?
>
> ~kurth
>
> $result = mysql_query( "SELECT pkgid FROM plans");
>   while($row = mysql_fetch_assoc($result)){
>   $resultpkg = mysql_query( "SELECT * FROM plans WHERE
> pkgid='$row[pkgid]'");
> $package = mysql_fetch_assoc($resultpkg);
>   }
>   
>   print_r($plan);
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 2D array from file

2001-09-26 Thread Brian White

I think this is not working because "\t" is a regular expression and explode
only works on strings..

Actually, I have no idea and I feeling very confused right now but maybe
try "split" and see how it goes.


Brian

At 13:37 26/09/2001 -0400, John Frenzel wrote:
>I have created a 2D array, then written it into a tet file. The file is
>written such that all the secondary array elements (the rows) are seperate
>lines, with the "columns" tab-delimited. Now I'd like to read this file back
>into a 2D array. I thought this should work:
>
>
>$array_file = file ("array.dat");
>for ($k=0; $k <= 63; $k++)
>{
> $array[$k] = explode( "\t", $array_file[$k] );
>}
>
>I know that $array[$k] is a valid variable, and that explode returns an
>array, so I'm not clear why this isn't working. If I use $array = explode(
>"\t", $array_file[$k] ); I get the line without any trouble. What am I
>missing?
>
>Thanks
>
>--- John Frenzel
>
>
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

-
Brian White
Step Two Designs Pty Ltd - SGML, XML & HTML Consultancy
Phone: +612-93197901
Web:   http://www.steptwo.com.au/
Email: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 2D array

2001-07-27 Thread AJDIN BRANDIC


That works OK

Thank you

Ajdin


On Fri, 27 Jul 2001, Wagner Tomy wrote:

> $my2darray = Array();
> 
> while(list($myname, $myphone, $myemail) = mysql_fetch_row($result)) {
>   $my2darray[$myname] = array($myphone, $myemail);
> }
> 
> Wagner Tomy
> Editus S.A.
> - Original Message -
> From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
> To: "Wagner Tomy" <[EMAIL PROTECTED]>
> Cc: <[EMAIL PROTECTED]>
> Sent: Friday, July 27, 2001 2:34 PM
> Subject: Re: [PHP] 2D array
> 
> 
> > Wag,
> >
> > I do not wish to push whole of the row into an array.
> > Also I need the id of the parent array to be $myname;
> >
> > Ajdin
> >
> > On Fri, 27 Jul 2001, Wagner Tomy wrote:
> >
> > > $my2darray = Array();
> > >
> > > while($row = mysql_fetch_row($result)) {
> > >   array_push($my2darray, $row);
> > > }
> > >
> > > OR:
> > >
> > > for($i = 0; $i < mysql_num_rows($result); $i++) {
> > >   $row = mysql_fetch_row($result);
> > > $my2darray[$i] = $row;
> > > }
> > >
> > > Wagner Tomy
> > > Editus S.A.
> > >
> > > - Original Message -
> > > From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>
> > > Sent: Friday, July 27, 2001 2:18 PM
> > > Subject: [PHP] 2D array
> > >
> > >
> > > > Hi
> > > >
> > > > I have been trying to do this for hours now.
> > > > I have a while loop (rows from mysql db) and on each pass I want to
> pussh
> > > > a new element into a 2D array, bot always end up with the last element
> of
> > > > the while loop.  So:
> > > >
> > > > table mytable
> > > > myname myphone myemail
> > > > john   254688  [EMAIL PROTECTED]
> > > > tom789787  [EMAIL PROTECTED]
> > > >
> > > > $myquery="select * from mytable";
> > > >
> > > > while ($myrow = mysql_fetch_array($myrows)) {
> > > >   .. .. . .  .
> > > >
> > > >   $my2darray = array ($myname => array ($myphone,$myemail));
> > > >
> > > > }
> > > >
> > > > $mycount=count(my2darray);  // returns 1
> > > >
> > > > while (list($key,$value) = each ($my2darray)) {
> > > >   echo"$key,";
> > > >   echo"$value[0]";
> > > >   echo"$value[1]";
> > > >   // retuns only one row with tom,798779,[EMAIL PROTECTED]
> > > > }
> > > >
> > > > How do I push multiple entries into a 2d array?
> > > >
> > > > I tried $my2darray[]=array(...
> > > >
> > > > Regards
> > > >
> > > > Ajdin
> > > >
> > > > --
> > > > PHP General Mailing List (http://www.php.net/)
> > > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > > To contact the list administrators, e-mail:
> [EMAIL PROTECTED]
> > > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> > >
> > >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 2D array

2001-07-27 Thread Wagner Tomy

$my2darray = Array();

while(list($myname, $myphone, $myemail) = mysql_fetch_row($result)) {
  $my2darray[$myname] = array($myphone, $myemail);
}

Wagner Tomy
Editus S.A.
- Original Message -
From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
To: "Wagner Tomy" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Friday, July 27, 2001 2:34 PM
Subject: Re: [PHP] 2D array


> Wag,
>
> I do not wish to push whole of the row into an array.
> Also I need the id of the parent array to be $myname;
>
> Ajdin
>
> On Fri, 27 Jul 2001, Wagner Tomy wrote:
>
> > $my2darray = Array();
> >
> > while($row = mysql_fetch_row($result)) {
> >   array_push($my2darray, $row);
> > }
> >
> > OR:
> >
> > for($i = 0; $i < mysql_num_rows($result); $i++) {
> >   $row = mysql_fetch_row($result);
> > $my2darray[$i] = $row;
> > }
> >
> > Wagner Tomy
> > Editus S.A.
> >
> > - Original Message -
> > From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, July 27, 2001 2:18 PM
> > Subject: [PHP] 2D array
> >
> >
> > > Hi
> > >
> > > I have been trying to do this for hours now.
> > > I have a while loop (rows from mysql db) and on each pass I want to
pussh
> > > a new element into a 2D array, bot always end up with the last element
of
> > > the while loop.  So:
> > >
> > > table mytable
> > > myname myphone myemail
> > > john   254688  [EMAIL PROTECTED]
> > > tom789787  [EMAIL PROTECTED]
> > >
> > > $myquery="select * from mytable";
> > >
> > > while ($myrow = mysql_fetch_array($myrows)) {
> > >   .. .. . .  .
> > >
> > >   $my2darray = array ($myname => array ($myphone,$myemail));
> > >
> > > }
> > >
> > > $mycount=count(my2darray);  // returns 1
> > >
> > > while (list($key,$value) = each ($my2darray)) {
> > >   echo"$key,";
> > >   echo"$value[0]";
> > >   echo"$value[1]";
> > >   // retuns only one row with tom,798779,[EMAIL PROTECTED]
> > > }
> > >
> > > How do I push multiple entries into a 2d array?
> > >
> > > I tried $my2darray[]=array(...
> > >
> > > Regards
> > >
> > > Ajdin
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 2D array

2001-07-27 Thread AJDIN BRANDIC

Wag,

I do not wish to push whole of the row into an array.
Also I need the id of the parent array to be $myname;

Ajdin

On Fri, 27 Jul 2001, Wagner Tomy wrote:

> $my2darray = Array();
> 
> while($row = mysql_fetch_row($result)) {
>   array_push($my2darray, $row);
> }
> 
> OR:
> 
> for($i = 0; $i < mysql_num_rows($result); $i++) {
>   $row = mysql_fetch_row($result);
> $my2darray[$i] = $row;
> }
> 
> Wagner Tomy
> Editus S.A.
> 
> - Original Message -
> From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 27, 2001 2:18 PM
> Subject: [PHP] 2D array
> 
> 
> > Hi
> >
> > I have been trying to do this for hours now.
> > I have a while loop (rows from mysql db) and on each pass I want to pussh
> > a new element into a 2D array, bot always end up with the last element of
> > the while loop.  So:
> >
> > table mytable
> > myname myphone myemail
> > john   254688  [EMAIL PROTECTED]
> > tom789787  [EMAIL PROTECTED]
> >
> > $myquery="select * from mytable";
> >
> > while ($myrow = mysql_fetch_array($myrows)) {
> >   .. .. . .  .
> >
> >   $my2darray = array ($myname => array ($myphone,$myemail));
> >
> > }
> >
> > $mycount=count(my2darray);  // returns 1
> >
> > while (list($key,$value) = each ($my2darray)) {
> >   echo"$key,";
> >   echo"$value[0]";
> >   echo"$value[1]";
> >   // retuns only one row with tom,798779,[EMAIL PROTECTED]
> > }
> >
> > How do I push multiple entries into a 2d array?
> >
> > I tried $my2darray[]=array(...
> >
> > Regards
> >
> > Ajdin
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
> 
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 2D array

2001-07-27 Thread Slavomir Slizik

or:

$my2darray[] = $row;

SSL


On Fri, 27 Jul 2001, Wagner Tomy wrote:

> $my2darray = Array();
>
> while($row = mysql_fetch_row($result)) {
>   array_push($my2darray, $row);
> }
>
> OR:
>
> for($i = 0; $i < mysql_num_rows($result); $i++) {
>   $row = mysql_fetch_row($result);
> $my2darray[$i] = $row;
> }
>
> Wagner Tomy
> Editus S.A.
>
> - Original Message -
> From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, July 27, 2001 2:18 PM
> Subject: [PHP] 2D array
>
>
> > Hi
> >
> > I have been trying to do this for hours now.
> > I have a while loop (rows from mysql db) and on each pass I want to pussh
> > a new element into a 2D array, bot always end up with the last element of
> > the while loop.  So:
> >
> > table mytable
> > myname myphone myemail
> > john   254688  [EMAIL PROTECTED]
> > tom789787  [EMAIL PROTECTED]
> >
> > $myquery="select * from mytable";
> >
> > while ($myrow = mysql_fetch_array($myrows)) {
> >   .. .. . .  .
> >
> >   $my2darray = array ($myname => array ($myphone,$myemail));
> >
> > }
> >
> > $mycount=count(my2darray);  // returns 1
> >
> > while (list($key,$value) = each ($my2darray)) {
> >   echo"$key,";
> >   echo"$value[0]";
> >   echo"$value[1]";
> >   // retuns only one row with tom,798779,[EMAIL PROTECTED]
> > }
> >
> > How do I push multiple entries into a 2d array?
> >
> > I tried $my2darray[]=array(...
> >
> > Regards
> >
> > Ajdin
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 2D array

2001-07-27 Thread Wagner Tomy

$my2darray = Array();

while($row = mysql_fetch_row($result)) {
  array_push($my2darray, $row);
}

OR:

for($i = 0; $i < mysql_num_rows($result); $i++) {
  $row = mysql_fetch_row($result);
$my2darray[$i] = $row;
}

Wagner Tomy
Editus S.A.

- Original Message -
From: "AJDIN BRANDIC" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 27, 2001 2:18 PM
Subject: [PHP] 2D array


> Hi
>
> I have been trying to do this for hours now.
> I have a while loop (rows from mysql db) and on each pass I want to pussh
> a new element into a 2D array, bot always end up with the last element of
> the while loop.  So:
>
> table mytable
> myname myphone myemail
> john   254688  [EMAIL PROTECTED]
> tom789787  [EMAIL PROTECTED]
>
> $myquery="select * from mytable";
>
> while ($myrow = mysql_fetch_array($myrows)) {
>   .. .. . .  .
>
>   $my2darray = array ($myname => array ($myphone,$myemail));
>
> }
>
> $mycount=count(my2darray);  // returns 1
>
> while (list($key,$value) = each ($my2darray)) {
>   echo"$key,";
>   echo"$value[0]";
>   echo"$value[1]";
>   // retuns only one row with tom,798779,[EMAIL PROTECTED]
> }
>
> How do I push multiple entries into a 2d array?
>
> I tried $my2darray[]=array(...
>
> Regards
>
> Ajdin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 2d array?

2001-01-10 Thread Toby Butzon

> $file should be the name of the file - there is a PHP
variable for this but
> I'm drawing a blank right now.

How about __FILE__ ? ;)

Note: it's a constant, so make sure you don't try to use a $
before it

--Toby

- Original Message -
From: "Joe Stump" <[EMAIL PROTECTED]>
To: "Kurth Bemis" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, January 10, 2001 8:46 PM
Subject: Re: [PHP] 2d array?


> I'll give it a whirl ...
>
> $array_of_page_titles = array(
> 'aboutus.php' => 'All about our company',
> 'index.php' => 'Welcome to www.server.com!',
> 'foo.php' => 'I\'m a worthless script!'
> );
>
> Then ...
>
> 
>
> $file should be the name of the file - there is a PHP
variable for this but
> I'm drawing a blank right now.
>
> --Joe
>
> On Wed, Jan 10, 2001 at 08:40:21PM -0500, Kurth Bemis
wrote:
> > i'm confused by the method the go about this.
> >
> > i want to have a location: home / company / about on a
page like
> > server.com/company/aboutus.php
> >
> > i'm thinking that i can use an array containing the page
name and then
> > search the array and return the page title.  now - how
do i do this with an
> > array?  I know that i've seen it done like
aboutus.php:About Company or
> > something.  Its hard to explain - can anyone help me?
> >
> > ~kurth
> > Kurth Bemis - Network/Systems Administrator,
USAExpress.net/Ozone Computer
> >
> > People disagree with me.  I just ignore them.
> >  -- Linus Torvalds, regarding the use of C++ for
the Linux kernel
> >
> > [EMAIL PROTECTED] | http://www.usaexpress.net/kurth
> > PGP key available - http://www.usaexpress.net/kurth/pgp
> >
> > Fight Weak Encryption!  Donate your wasted CPU cycles to
Distributed.net
> > (http://www.distributed.net)
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail:
[EMAIL PROTECTED]
> > For additional commands, e-mail:
[EMAIL PROTECTED]
> > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
>
> --
>
> Joe Stump, PHP Hacker
> [EMAIL PROTECTED]
> http://www.miester.org/
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
[EMAIL PROTECTED]
> For additional commands, e-mail:
[EMAIL PROTECTED]
> To contact the list administrators, e-mail:
[EMAIL PROTECTED]
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] 2d array?

2001-01-10 Thread Joe Stump

I'll give it a whirl ...

$array_of_page_titles = array(
'aboutus.php' => 'All about our company',
'index.php' => 'Welcome to www.server.com!',
'foo.php' => 'I\'m a worthless script!'
);

Then ...



$file should be the name of the file - there is a PHP variable for this but
I'm drawing a blank right now.

--Joe

On Wed, Jan 10, 2001 at 08:40:21PM -0500, Kurth Bemis wrote:
> i'm confused by the method the go about this.
> 
> i want to have a location: home / company / about on a page like 
> server.com/company/aboutus.php
> 
> i'm thinking that i can use an array containing the page name and then 
> search the array and return the page title.  now - how do i do this with an 
> array?  I know that i've seen it done like aboutus.php:About Company or 
> something.  Its hard to explain - can anyone help me?
> 
> ~kurth
> Kurth Bemis - Network/Systems Administrator, USAExpress.net/Ozone Computer
> 
> People disagree with me.  I just ignore them.
>  -- Linus Torvalds, regarding the use of C++ for the Linux kernel
> 
> [EMAIL PROTECTED] | http://www.usaexpress.net/kurth
> PGP key available - http://www.usaexpress.net/kurth/pgp
> 
> Fight Weak Encryption!  Donate your wasted CPU cycles to Distributed.net 
> (http://www.distributed.net)
> 
> 
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

Joe Stump, PHP Hacker
[EMAIL PROTECTED]
http://www.miester.org/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]