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] =>
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 gen
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
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 use
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
$BannerSize = implode($_POST['BannerSize'], ',');
Looks like you have your arguments backwards; try:
$BannerSize = implode(',',$_POST['BannerSize']);
--Greg
with implode one can reverse the function arguments i know .. but
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
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 wron
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 $resul
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 ) {
//Add
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 unsubscri
[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
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:
It does not send any errors back. If you substitute $array = array(); with
$array = ""; you'll get a woarning: "Warning: implode():
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 an
* 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";)
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 th
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
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 ch
> > > 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', ";
> >
> > T
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 != '') $sqlUpda
> 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 a
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,
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
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 arg
> 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* quer
25 matches
Mail list logo