[PHP] array or list of objects of different types

2010-04-02 Thread Php Developer
Hi all, I want to be able to have an array of elements of different types. As an example: the first element is a boolean, the second is an integer, and the thirs is a string. In php there is no typing, i'm just wondering if there is a way to have that, it would be a lot better than having an

Re: [PHP] Array to List

2003-08-14 Thread Chris Boget
Everything is fine in your script up to here: $row_GetCampuses = mysql_fetch_assoc($GetCampuses); The above is getting just one (1) record from the database. If you ever have only one, you are good to go. $totalRows_GetCampuses = mysql_num_rows($GetCampuses); I'm not sure what you are doing

Re: [PHP] Array to List

2003-08-14 Thread Jim Lucas
PROTECTED] Sent: Monday, August 11, 2003 1:29 PM Subject: RE: [PHP] Array to List All, Thanks for your help, but this shouldn't be so freaking hard to do. sigh 1) I have a multiple select input on one page that is populated with a list of campuses. The user selects which campus(es) to search on. 2

Re: [PHP] Array to List

2003-08-14 Thread CPT John W. Holmes
From: James Johnson [EMAIL PROTECTED] Actually, I'm using $campusList for a SQL statement: SELECT name FROM campuses WHERE inst_id IN ('$campusList'); It wasn't working until I found out that $campusList needs to look like '1','2','3'. $campusList = implode( ', ', $_POST['campus'] );

RE: [PHP] Array to List

2003-08-14 Thread James Johnson
11, 2003 1:42 PM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List Everything is fine in your script up to here: $row_GetCampuses = mysql_fetch_assoc($GetCampuses); The above is getting just one (1) record from the database. If you ever have only one, you are good to go

RE: [PHP] Array to List

2003-08-14 Thread James Johnson
] Subject: Re: [PHP] Array to List Coming from ColdFusion, this is difficult. CF has an ArrayToList() function. I can't find anything similar in PHP. implode(); I'm building a list from an array with the following code, but it puts a trailing , and I need to remove it. [snip] $campusList

[PHP] Array to List

2003-08-14 Thread James Johnson
Hello, Coming from ColdFusion, this is difficult. CF has an ArrayToList() function. I can't find anything similar in PHP. I'm building a list from an array with the following code, but it puts a trailing , and I need to remove it. $campusList = ; foreach

Re: [PHP] Array to List

2003-08-11 Thread Curt Zirzow
* Thus wrote James Johnson ([EMAIL PROTECTED]): Hello, Coming from ColdFusion, this is difficult. CF has an ArrayToList() function. I can't find anything similar in PHP. I'm building a list from an array with the following code, but it puts a trailing , and I need to remove it.

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
Chris, thanks that works perfectly -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 11:50 AM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List Coming from ColdFusion, this is difficult. CF has an ArrayToList() function

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 1:12 PM To: James Johnson; 'Chris Boget'; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List From: James Johnson [EMAIL PROTECTED] Actually, I'm using $campusList for a SQL statement: SELECT name FROM campuses WHERE inst_id IN ('$campusList

RE: [PHP] Array to List

2003-08-11 Thread James Johnson
... James -Original Message- From: Jim Lucas [mailto:[EMAIL PROTECTED] Sent: Monday, August 11, 2003 1:32 PM To: James Johnson; [EMAIL PROTECTED] Subject: Re: [PHP] Array to List on page one do this instead. ?php session_start(); if(isset($_POST['Submit'])) { $_SESSION

Re: [PHP] Array to List

2003-08-11 Thread Chris Boget
Coming from ColdFusion, this is difficult. CF has an ArrayToList() function. I can't find anything similar in PHP. implode(); I'm building a list from an array with the following code, but it puts a trailing , and I need to remove it. [snip] $campusList = implode( ', ', $_POST['campus'] );