Can any one tell me how can i implode a two D Array.
i can implode normal arrays, but when i try to implode multidimensional
Arrays, the result is empty.
can some one tell me how to implode an array Like This
$x=array ( [0] = array ( [side] = sell [stock_code] = AFMC.CA [quantity]
= 200 ) ,
salmarayan wrote:
Can any one tell me how can i implode a two D Array.
i can implode normal arrays, but when i try to implode multidimensional
Arrays, the result is empty.
can some one tell me how to implode an array Like This
$x=array ( [0] = array ( [side] = sell [stock_code] = AFMC.CA
I have read the whole forum at php.net on implode and I still don't get why
this one does not work
if (isset($_POST['BannerSize'])){$BannerSize =
implode($_POST['BannerSize'],',');} else {$BannerSize = ;}
someone please help
with implode one can reverse the function arguments i know .. but
?php
$BannerSize = '';
if (isset($_POST['BannerSize']) is_array($_POST['BannerSize']))
{
$BannerSize = implode(',', $_POST['BannerSize']);
}
?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
$BannerSize = implode($_POST['BannerSize'], ',');
Looks like you have your arguments backwards; try:
$BannerSize = implode(',',$_POST['BannerSize']);
--Greg
Terion Miller wrote:
I have read the whole forum at php.net on implode and I still don't get why
this one does not work
if (isset($_POST['BannerSize'])){$BannerSize =
implode($_POST['BannerSize'],',');} else {$BannerSize = ;}
someone please help
Is $_POST['BannerSize'] an array?
e.g. IS
Can we see the form, please?
As well, try using print_r on the array and see what it outputs.
- Craige
Terion Miller wrote:
yes there is , the selections are coming from a form (which isn't
working because its not inserting into the db---ah another post later
I imagine)
do you think a mis
On 11/18/08, Terion Miller [EMAIL PROTECTED] wrote:
I have read the whole forum at php.net on implode and I still don't get
why
this one does not work
if (isset($_POST['BannerSize'])){$BannerSize =
implode($_POST['BannerSize'],',');} else {$BannerSize = ;}
someone please help
You appear
Terion Miller wrote:
I have read the whole forum at php.net on implode and I still don't get why
this one does not work
if (isset($_POST['BannerSize'])){$BannerSize =
implode($_POST['BannerSize'],',');} else {$BannerSize = ;}
someone please help
Including the error that is generated
Hi all,
I'm trying to fetch similar things - in this case, rows which share a
series ID no - and bring them into an array and display them grouped by
what makes them similar (in this case, series id). I looked at implode
and explode which seem wrong for this - the only separator I can see is
You're close, but you need to group your data on the series_id first.
You can do that by looping through your array and creating another
array using series_id as the array key. You'll end up with a list of
arrays named after the series_id.
foreach( $result_set as $result_item ) {
Brent Baisley wrote:
You're close, but you need to group your data on the series_id first.
You can do that by looping through your array and creating another array
using series_id as the array key. You'll end up with a list of arrays
named after the series_id.
foreach( $result_set as
On Mon, June 6, 2005 5:32 am, Jack Jackson said:
I'm trying to fetch similar things - in this case, rows which share a
series ID no - and bring them into an array and display them grouped by
what makes them similar (in this case, series id). I looked at implode
and explode which seem wrong
hi there,
i am using implode to get the contents of an array into a single variable:
$enterprises = implode(,, $enterprise) //enterprise contains the array.
however, if the array is empty (the user didnt select anything in the form),
the implode function errors out.
can anyone think of a way
resolved with if(empty()) - apologies.
[EMAIL PROTECTED] wrote:
hi there,
i am using implode to get the contents of an array into a single variable:
$enterprises = implode(,, $enterprise) //enterprise contains the array.
however, if the array is empty (the user didnt select anything
Hello,
I suppose the $enterprise variable doesn't hold an empty array but is not
defined and because of this you get the error. Test with the following
example:
?php
$array = array();
$comma_separated = implode(,, $array);
echo $comma_separated;
?
It does not send any errors back. If you
[EMAIL PROTECTED] wrote:
resolved with if(empty()) - apologies.
isset() is more apropriate as $enterprise is not defined at all, empty()
will issue a notice.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
From: Marek Kilimajer [EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
resolved with if(empty()) - apologies.
isset() is more apropriate as $enterprise is not defined at all, empty()
will issue a notice.
No it won't.
---John Holmes...
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
* Thus wrote CPT John W. Holmes ([EMAIL PROTECTED]):
From: frederik feys [EMAIL PROTECTED]
I thought str_replace caused slow down of my mailing script, but it
seems to be this line of code:
$fd =
implode(,file(http://www.domain.org/store/min/Mailing_template.html;)
);
I first
Hi all,
I thought str_replace caused slow down of my mailing script, but it
seems to be this line of code:
$fd =
implode(,file(http://www.domain.org/store/min/Mailing_template.html;)
);
I first put the mailing template in $fd (only once) and then replace
(str_replace) elements of it to
From: frederik feys [EMAIL PROTECTED]
I thought str_replace caused slow down of my mailing script, but it
seems to be this line of code:
$fd =
implode(,file(http://www.domain.org/store/min/Mailing_template.html;)
);
I first put the mailing template in $fd (only once) and then replace
implode() expects an array as the second argument. You're passing a
string. In
fact with the code you have above I don't see why you don't just tack the
comma on the end in the first place:
if($image11_name != '') $sqlUpdate .= image11='$image11_name', ;
The reason being the comma at the
On Wednesday 27 November 2002 02:19, Jef wrote:
implode() expects an array as the second argument. You're passing a
string. In
fact with the code you have above I don't see why you don't just tack the
comma on the end in the first place:
if($image11_name != '') $sqlUpdate .=
implode() expects an array as the second argument. You're passing a
string. In fact with the code you have above I don't see why you don't
just tack
the comma on the end in the first place:
if($image11_name != '') $sqlUpdate .= image11='$image11_name', ;
The reason being the
On Wednesday 27 November 2002 02:57, Jef wrote:
The problem is I don't know which will be the last element in the string. I
am allowing 9 images to be changed, 9 text labels to be changed, and 9
links to be changed. I don't know which will be the last. I'm using an
update sql command to
Jef wrote:
implode() expects an array as the second argument. You're passing a
string. In
fact with the code you have above I don't see why you don't just tack the
comma on the end in the first place:
if($image11_name != '') $sqlUpdate .= image11='$image11_name', ;
The reason being the
I need help once more. I have a variable that is a string with spaces. What I need to
do is put a + sign in the spaces so that the string will print like
This+is+a+string. I have tried using implode, but I get this error:
Warning: Bad arguments to implode()
The code I am using is as follows:
str_replace
On Mon, 25 Nov 2002, Jami wrote:
I need help once more. I have a variable that is a string with spaces. What I need
to do is put a + sign in the spaces so that the string will print like
This+is+a+string. I have tried using implode, but I get this error:
Warning: Bad arguments
Ok, figures I would be looking for something else and find the solution.
urlencode(). Thanks for the reply Rasmus. :-)
Jami
- Original Message -
From: Jami [EMAIL PROTECTED]
To: PHP General [EMAIL PROTECTED]
Sent: Monday, November 25, 2002 11:26 PM
Subject: [PHP] implode()?
I need
On Tuesday 26 November 2002 14:51, Jef wrote:
I am having difficulty with the implode function. What I am doing is
building a string for an UPDATE SQL command. At the end of the building
portion of the code, I want to insert a comma between the various fields
that will be updated. However, it
I am having difficulty with the implode function. What I am doing is
building a string for an UPDATE SQL command. At the end of the building
portion of the code, I want to insert a comma between the various fields
that will be updated. However, it is not working. Here is a portion of my
What is the best way to pull data from one table and insert into another?
insert into newmembers(name, email, whatever) select name, email, whatever
from oldmembers
How can I delete entries from a table with a php document?
The same way you select entries.
mysql_query() can send *ANY* query
What is the best way to pull data from one table and insert into another?
How can I delete entries from a table with a php document?
The gist of what I'm trying to accomplish is this. This is somewhat of a
detailed outline, so please bear with me.
1. I have one table (members) that has all the
33 matches
Mail list logo