Hey Tim,
It seems that deleteObject takes in 2 params, and you are sending it 1
param. I would recommend you look at the documentation and make sure you
are sending the right params.
Aziz
On Sun, Sep 29, 2013 at 10:29 PM, Tim Dunphy bluethu...@gmail.com wrote:
Hi Aziz,
Thank you for
Hi All,
I am attempting to delete an empty S3 bucket using the AWS PHP SDK.
Here's how they describe the process in the docs:
$result = $client-deleteBucket(array(
// Bucket is required
'Bucket' = 'string',
));
You can find the full entry here:
AWS PHP SDK Delete Bucket
On Sun, 2013-09-29 at 12:30 -0400, Tim Dunphy wrote:
Hi All,
I am attempting to delete an empty S3 bucket using the AWS PHP SDK.
Here's how they describe the process in the docs:
$result = $client-deleteBucket(array(
// Bucket is required
'Bucket' = 'string',
));
You
Hi Tim,
Is the call working? Does it actually get deleted?
This could just be an issue (which I see alot) where developers do not
check for variables or preset them before usage, causing those notices to
come up (pretty harmless most of the times).
Aziz
On Sun, Sep 29, 2013 at 12:30 PM, Tim
Hey guys,
Sorry about that i should have posted the full code to give you some idea
of context. Anyway, here it is:
?php
require_once 'sdk.class.php';
if (isset($_POST['submit'])) {
* $bucket_name = $_POST['$bucket_name'];*
// Create the S3 Object from the SDK
*$s3 = new AmazonS3();*
*
No Problem, the issue is that you referring to the invalid post element
$bucket_name as opposed to the correct on bucket_name.
*$bucket_name = $_POST['$bucket_name'];*
Should be
*$bucket_name = $_POST['bucket_name'];*
Aziz
On Sun, Sep 29, 2013 at 3:28 PM, Tim Dunphy bluethu...@gmail.com
Hi Aziz,
Thank you for getting back to me!
I appreciate you spotting that error.
So I corrected that
?php
require_once 'sdk.class.php';
if (isset($_POST['submit'])) {
* $bucket_name = $_POST['bucket_name'];*
// Create the S3 Object from the SDK
$s3 = new AmazonS3();
*
$result =
Hoisted on me own petard, as it were.
Meant this to go to OP and list, not Jim.
-- Forwarded message --
From: tamouse mailing lists tamouse.li...@gmail.com
Date: Thu, Nov 10, 2011 at 3:25 AM
Subject: Re: [PHP] delete and recreate
To: Jim Lucas li...@cmsws.com
On Wed, Nov 9
So, I want to create a script to delete an old file and create a new
one which is empty. The script receives a password via query string.
The obvious methods give me back a very useless 500 error. Any
suggestions on how to accomplish what I seek?
--
end
Very Truly yours,
-
On 9 Nov 2011, at 15:35, Kirk Bailey wrote:
So, I want to create a script to delete an old file and create a new one
which is empty. The script receives a password via query string. The obvious
methods give me back a very useless 500 error. Any suggestions on how to
accomplish what I seek?
On Wed, Nov 9, 2011 at 10:35 AM, Kirk Bailey kbai...@howlermonkey.netwrote:
So, I want to create a script to delete an old file and create a new one
which is empty. The script receives a password via query string. The
obvious methods give me back a very useless 500 error. Any suggestions on
Is anyone concerned about the OP's original statement about receives a
password via query string. Perhaps that is his problem since he did
mention it? I didn't attempt to answer it because I didn't know what/why he
was prompting for a password.
--
PHP General Mailing List
On 11/9/2011 7:35 AM, Kirk Bailey wrote:
So, I want to create a script to delete an old file and create a new one which
is empty. The script receives a password via query string. The obvious methods
give me back a very useless 500 error. Any suggestions on how to accomplish
what
I seek?
...@gmail.com]
Sent: Friday, April 29, 2011 12:33 AM
To: php-general@lists.php.net
Subject: [PHP] PHP delete confirmation
I have been trying to figure out how to add delete confirmation for
the bellow snippet of code. I would prefer not to use javascript. Can
anyone offer any advise on how to right
On Friday, April 29, 2011, ad...@buskirkgraphics.com wrote:
Personally I would use the javascript page navigation is senseless if they
miss click.
Javascript: Small and simple javascript.
onclick=return confirm('Are you sure you want to delete?')
Personally, I'd use Javascript and also
On 4/29/2011 12:06 AM, Geoff Lane wrote:
On Friday, April 29, 2011, ad...@buskirkgraphics.com wrote:
Personally I would use the javascript page navigation is senseless if they
miss click.
Javascript: Small and simple javascript.
onclick=return confirm('Are you sure you want to
Jim Lucas li...@cmsws.com wrote:
On 4/29/2011 12:06 AM, Geoff Lane wrote:
On Friday, April 29, 2011, ad...@buskirkgraphics.com wrote:
Personally I would use the javascript page navigation is senseless
if they
miss click.
Javascript: Small and simple javascript.
onclick=return confirm('Are
I have been trying to figure out how to add delete confirmation for
the bellow snippet of code. I would prefer not to use javascript. Can
anyone offer any advise on how to right the delete confirmation in
PHP?
Thank you in advance.
P.S. I apologize for the indention. For some reason gmail messes
: Chris Stinemetz [mailto:chrisstinem...@gmail.com]
Sent: Friday, April 29, 2011 12:33 AM
To: php-general@lists.php.net
Subject: [PHP] PHP delete confirmation
I have been trying to figure out how to add delete confirmation for
the bellow snippet of code. I would prefer not to use javascript. Can
Hi,
I need to delete a file with any file extension where i know the name of the
file, is it possible to use regular expressions with the unlink function?
Thanks
_
Use glob() to get a list of matching afiles nd then unlink() them
separately.
I need to delete a file with any file extension where i know the
name of the file, is it possible to use regular expressions with the unlink
function?
--
PHP General Mailing List (http://www.php.net/)
To
You can't use regular expression with unlink directly.
have a look on this
http://www.phpfreaks.com/forums/index.php?topic=256367.0
http://www.phpfreaks.com/forums/index.php?topic=256367.0Regards
Cherankrish
On Tue, Jun 15, 2010 at 4:17 PM, Shaun Thornburgh
shaunthornbu...@hotmail.com wrote:
On Tue, 2010-06-15 at 16:23 +0530, cheran krishnamoorthy wrote:
You can't use regular expression with unlink directly.
have a look on this
http://www.phpfreaks.com/forums/index.php?topic=256367.0
http://www.phpfreaks.com/forums/index.php?topic=256367.0Regards
Cherankrish
On Tue, Jun 15,
I just had a bright idea ???
Am doing editing file for book entries; it occurs to me (now that I am
practically finished) that it might be much simpler to delete entries
and just insert rather than going through the rigamarole of checking if
the new entries exist and if and if and if... just
On Tue, Jun 23, 2009 at 4:20 PM, PJaf.gour...@videotron.ca wrote:
I just had a bright idea ???
Am doing editing file for book entries; it occurs to me (now that I am
practically finished) that it might be much simpler to delete entries
and just insert rather than going through the rigamarole
I am working on a script that log in, look for messages, download them
(including any attached files) and then deletes the message from a lotus
domino server. What I have access to is a simple web-gui that I access
throu CURL. So far I have been able to do the following:
Log in and save a
Balasubramanyam A wrote:
Hi all,
I'm searching names from MySQL and printing it on a browser. Also, I've
provided checkbox for all the rows and a delete button for a page. I want to
delete the selected rows from MySQL when I click on the Delete button. How
do I do that?
Here is the code which
Hi all,
I'm searching names from MySQL and printing it on a browser. Also, I've
provided checkbox for all the rows and a delete button for a page. I want to
delete the selected rows from MySQL when I click on the Delete button. How
do I do that?
Here is the code which I used to print the rows
Balasubramanyam A wrote:
Hi all,
I'm searching names from MySQL and printing it on a browser. Also,
I've provided checkbox for all the rows and a delete button for a
page. I want to delete the selected rows from MySQL when I click on
the Delete button. How do I do that?
You process the
On Jan 5, 2008 9:03 AM, Balasubramanyam A [EMAIL PROTECTED] wrote:
Hi all,
Hi!
[snip]
while ($line = mysql_fetch_array($resultset, MYSQL_ASSOC)) {
[snip]
Just a side note: wouldn't it be easier to just use
mysql_fetch_assoc() ? It does the exact same thing, with less typing.
--
Wow, I actually managed to get this working now. Thanks to Richard and stut
I realized I was on the right track but had my code screwed up. Richard your
right, a primary key column was silly but was a temporary fix. It allowed me
to delete with one column and not have to reference a second. So
On Sat, August 18, 2007 6:31 pm, nitrox . wrote:
Is it not considered good practice to have a primary key on a lookup
table for a database?
I have 3 tables setup, games, memberleagues and members. The
memberleagues table holds the id of the games table and members table.
The problem I have is
Hi all,
Is it not considered good practice to have a primary key on a lookup table for
a database?
I have 3 tables setup, games, memberleagues and members. The memberleagues
table holds the id of the games table and members table. The problem I have is
that Im not sure how to delete a row
Whether or not it's good practice depends on who you ask. :-)
Every table should have a primary key. Primary keys, however, may span
multiple columns. That's perfectly legal. In some cases that primary key
may span every column, but generally that's a sign of bad design unless
you're
Do one, and only one, fgetcsv() before you entere the loop?
Or, if only SOME people add the header lines to their CSV file, check
if one of the numeric fields is actually numeric, and skip any bad
lines.
You could even keep a counter going of which line you are on, and give
an error message if
The below script will parse a csv file to a database I need to remove
the first line because it is the header files and I don't need them. How can
I test for that and remove them.
$file = fopen($_POST['copy'], 'r') or $message .= Could not open .
$_POST[copy] . for reading.BR\n;
Richard Kurth wrote:
The below script will parse a csv file to a database I need to remove
the first line because it is the header files and I don't need them. How can
I test for that and remove them.
$file = fopen($_POST['copy'], 'r') or $message .= Could not open .
$_POST[copy] . for
I created a form where users can upload.
I'm working on the section where admins can delete entries.
When I have a user delete an entery, I have it taking out of MySQL
(working fine)
But how do I delete the file that was uploaded?
Thanks for any help
Ben
--
PHP General
[snip]
I created a form where users can upload.
I'm working on the section where admins can delete entries.
When I have a user delete an entery, I have it taking out of MySQL
(working fine)
But how do I delete the file that was uploaded?
Thanks for any help
[/snip]
http://www.php.net/unlink
You unlink it.
Mike
Message Received: Jul 17 2006, 04:26 PM
From: Benjamin Adams [EMAIL PROTECTED]
To: php php php-general@lists.php.net
Cc:
Subject: [PHP] Delete an upload
I created a form where users can upload.
I'm working on the section
On Sat, June 3, 2006 8:40 pm, George Babichev wrote:
Hello everyone! I wrote a blog application, but now for the admin
panel, i
am trying to add a feature to delete blog posts. It would show the
title of
the post next to it, and have a delete link which would delete it. How
would
I do this?
On Sun, June 4, 2006 3:11 am, Rabin Vincent wrote:
You may find it easier to generate links of the form
delete.php?id=1, etc. Then you won't have to use a seperate
form for each link. The id will be available in delete.php
in $_GET. The same sanity checking applies in this case too.
Gah!
On Sun, June 4, 2006 3:11 am, Rabin Vincent wrote:
You may find it easier to generate links of the form
delete.php?id=1, etc. Then you won't have to use a seperate
form for each link. The id will be available in delete.php
in $_GET. The same sanity checking applies in this case too.
Gah!
That
On Mon, June 5, 2006 12:41 am, Rabin Vincent wrote:
I don't see how POST is better/more secure for a delete action.
If you don't see how it's better, then READ THE HTTP SPECS!!!
--
Like Music?
http://l-i-e.com/artists.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
On Mon, June 5, 2006 11:52 am, Chris Boget wrote:
On Sun, June 4, 2006 3:11 am, Rabin Vincent wrote:
You may find it easier to generate links of the form
delete.php?id=1, etc. Then you won't have to use a seperate
form for each link. The id will be available in delete.php
in $_GET. The same
General list php-general@lists.php.net
Sent: Saturday, June 03, 2006 6:40 PM
Subject: [PHP] Delete
Hello everyone! I wrote a blog application, but now for the admin
panel,
i
am trying to add a feature to delete blog posts. It would show the
title
of
the post next
On 6/4/06, Larry Garfield [EMAIL PROTECTED] wrote:
Make each button a separate form, with the id as a hidden value. Like so:
div
form method='post'
pMy first entry/p
input type='hidden' name='id' value='1' /
input type='submit' value='Delete' /
/form
/div
[snip]
You may find it easier to
At 10:53 PM -0700 6/3/06, George Babichev wrote:
Thank you for the help guys, but the I guess I kinda have another question.
So I do assign an id to each blog post, and it is auto_increment, so in my
blog delete page, it would display all the blog title's and a delete button
nex to it. So lets say
On Sunday 04 June 2006 03:11, Rabin Vincent wrote:
On 6/4/06, Larry Garfield [EMAIL PROTECTED] wrote:
Make each button a separate form, with the id as a hidden value. Like
so:
div
form method='post'
pMy first entry/p
input type='hidden' name='id' value='1' /
input type='submit'
Yes, that checkbox idea is exactly what I was thinking about. Exept I have
no idea how my program would tell one checkbox from the other, and delete
the wrong thing...
On 6/4/06, tedd [EMAIL PROTECTED] wrote:
At 10:53 PM -0700 6/3/06, George Babichev wrote:
Thank you for the help guys, but the
At 10:30 AM -0700 6/4/06, George Babichev wrote:
Yes, that checkbox idea is exactly what I was thinking about. Exept I have no
idea how my program would tell one checkbox from the other, and delete the
wrong thing...
George:
You're going to have to play around with forms and find out how
On 6/4/06, Larry Garfield [EMAIL PROTECTED] wrote:
Only if delete.php is a confirmation page. Never ever ever have a delete
function that operates solely by GET.
Here's why: http://thedailywtf.com/forums/thread/66166.aspx
Yes, I've seen that one before. IMO the main problem there
is the
On Monday 05 June 2006 00:41, Rabin Vincent wrote:
On 6/4/06, Larry Garfield [EMAIL PROTECTED] wrote:
Only if delete.php is a confirmation page. Never ever ever have a
delete function that operates solely by GET.
Here's why: http://thedailywtf.com/forums/thread/66166.aspx
Yes, I've
Hello everyone! I wrote a blog application, but now for the admin panel, i
am trying to add a feature to delete blog posts. It would show the title of
the post next to it, and have a delete link which would delete it. How would
I do this? I mean if I have multiple blog entry's, how would I delete
-general@lists.php.net
Sent: Saturday, June 03, 2006 6:40 PM
Subject: [PHP] Delete
Hello everyone! I wrote a blog application, but now for the admin panel, i
am trying to add a feature to delete blog posts. It would show the title
of
the post next to it, and have a delete link which would delete
On 6/4/06, George Babichev [EMAIL PROTECTED] wrote:
Hello everyone! I wrote a blog application, but now for the admin panel, i
am trying to add a feature to delete blog posts. It would show the title of
the post next to it, and have a delete link which would delete it. How would
I do this? I
the
database.
- Original Message -
From: George Babichev [EMAIL PROTECTED]
To: PHP General list php-general@lists.php.net
Sent: Saturday, June 03, 2006 6:40 PM
Subject: [PHP] Delete
Hello everyone! I wrote a blog application, but now for the admin panel,
i
am trying to add a feature to delete
Hi,
I have a movie database with this structure:
flick_name text
part_url text
part_size varchar(50)
time_length varchar(50)
part_format varchar(10)
and my select statement is something like this:
insert into table values
(abba,http://...abba1.wmv,3 mb,3
Ryan A wrote:
want i want to do is, do a select and get the data that is already in the
db, compare it, and if its in the insert statement delete those rows...
am getting screwed up in the logic for this...so far I have exploaded the
insert statement so its in a neat array, now i need to check
Thanks. That's what I was looking for...
Burhan Khalid [EMAIL PROTECTED] kirjoitti
viestissä:[EMAIL PROTECTED]
William Stokes wrote:
Hello,
Is it possible to delete a session cookie from browser? If so how?
http://www.php.net/manual/en/function.session-destroy.php
See the example.
--
Hello,
Is it possible to delete a session cookie from browser? If so how?
Thanks
-Will
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Wednesday 20 April 2005 14:51, William Stokes wrote:
Hello,
Is it possible to delete a session cookie from browser? If so how?
Just unset it.
Thanks
-Will
--
Cyberly yours,
Petar Nedyalkov
Devoted Orbitel Fan :-)
PGP ID: 7AE45436
PGP Public Key: http://bu.orbitel.bg/pgp/bu.asc
PGP
William Stokes wrote:
Hello,
Is it possible to delete a session cookie from browser? If so how?
http://www.php.net/manual/en/function.session-destroy.php
See the example.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello,
How can I let user delete a uploaded image file in the server's directory?
Thanks
-Will
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
[snip]
How can I let user delete a uploaded image file in the server's
directory?
[/snip]
http://www.php.net/unlink
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Hello William,
Thursday, March 24, 2005, 2:08:13 PM, you wrote:
WS How can I let user delete a uploaded image file in the server's
WS directory?
unlink()
Best regards,
Richard Davey
--
http://www.launchcode.co.uk - PHP Development Services
I do not fear computers. I fear the lack of them.
Hi,
I am trying to create an XML file, it will be done in stages so if the file
isn't present I will add the line:
?xml version=1.0 ?
root_element
Then for each line I add I add the following
child_elementdatachild_element
But for various reasons the application won't know when
Shaun wrote:
Hi,
I am trying to create an XML file, it will be done in stages so if the file
isn't present I will add the line:
?xml version=1.0 ?
root_element
Then for each line I add I add the following
child_elementdatachild_element
But for various reasons the application won't
Hi,
I have a database that contains encrypted data using Mysql function
ENCODE(). Certain users will be allowed to view this data and I will allow
them to download a CSV file contain the decrypted data using the Mysql
DECODE() function. However I don't want this file to be left on the server,
I have a database that contains encrypted data using Mysql function
ENCODE(). Certain users will be allowed to view this data and I will allow
them to download a CSV file contain the decrypted data using the Mysql
DECODE() function. However I don't want this file to be left on the server,
is
Hi Matt,
Thanks for the reply, I know how to delete a file I just wanted to know if
its possible to ensure that its deleted automatically as soon as the user
has downloaded it.
Thanks...
Matt M. [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
I have a database that contains
Shaun wrote:
Thanks for the reply, I know how to delete a file I just wanted to know if
its possible to ensure that its deleted automatically as soon as the user
has downloaded it.
Yes.
You don't even put the file into your web tree DocumentRoot directory, and
you write a PHP script that
Matt M. wrote:
I have a database that contains encrypted data using Mysql function
ENCODE(). Certain users will be allowed to view this data and I will
allow
them to download a CSV file contain the decrypted data using the Mysql
DECODE() function. However I don't want this file to be left on
On Tue, 2005-02-15 at 14:00, Richard Lynch wrote:
Matt M. wrote:
I have a database that contains encrypted data using Mysql function
ENCODE(). Certain users will be allowed to view this data and I will
allow
them to download a CSV file contain the decrypted data using the Mysql
DECODE()
Shaun wrote:
Hi,
I have a database that contains encrypted data using Mysql function
ENCODE(). Certain users will be allowed to view this data and I will allow
them to download a CSV file contain the decrypted data using the Mysql
DECODE() function. However I don't want this file to be left on
Hi Marek,
Thanks for your reply, could you tell me how I would go about this please?
Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Shaun wrote:
Hi,
I have a database that contains encrypted data using Mysql function
ENCODE(). Certain users will be allowed to
Shaun wrote:
Hi Marek,
Thanks for your reply, could you tell me how I would go about this please?
Marek Kilimajer [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Shaun wrote:
Hi,
I have a database that contains encrypted data using Mysql function
ENCODE(). Certain users will be
Shaun wrote:
Hi Marek,
Thanks for your reply, could you tell me how I would go about this please?
?php
header('Content-type: text/csv');
header('Content-Disposition: attachment; filename=download.csv');
/** Now you perform the MySQL query, DECODE the information and echo it
to the screen.
Shaun wrote:
Hi Marek,
Thanks for your reply, could you tell me how I would go about this please?
?php
require 'connect.inc';
$query = select * from whatever;
$data = mysql_query($query);
while ($row = mysql_fetch_row($data)){
echo implode(\t, $data), \n;
}
?
You can muck
Hello,
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
Thanks
Tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
Hello,
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
Thanks
Tim
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
[snip]
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
[/snip]
Create a script that deletes files in the directory and then CRON it.
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the
moment that are able to do this? (And where I can find them?)
Thanks
Tim
Sounds more like a job for cron than for PHP - man crontab should set you
up...
On Tue, 15 Feb 2005 01:22:42 +1030, Tim Burgan [EMAIL PROTECTED] wrote:
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
You can put a tmp file in
On Tue, 2005-02-15 at 02:12 +1030, Tim Burgan wrote:
Hello,
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
Thanks
Tim
What operating
Tim Burgan wrote:
Hello,
How can I delete ALL files within a specified directory every 20 days?
Does anyone know of any code-snippets that are around at the moment that
are able to do this? (And where I can find them?)
Thanks
Tim
Write a script that will delete them, and set the script to run on
Hello
take a look a the Pear File_Find class
require_once 'File/Find.php';
$fs = new File_Find;
$data = $fs-maptree('my_dir');
$data[0] contains all directorys
$data[1] all files
$ok = 0;
$err = 0;
foreach ($data[1] as $key)
{
if
Hello Jochem,
Wednesday, January 12, 2005, 8:08:09 PM, you wrote:
JM read the manual entry first (see below) - and understand what the
JM function actually does - never just assume because its giving you
JM the result you want now that it will always work the way you
JM expect.
Don't be a
use the unset() function.
for ($i = 0; $i count($array); $i++) {
if (empty($array[$i]) {
unset($array[$i]);
}
}
On Wed, 2005-01-12 at 16:22, Sebastian wrote:
how do i delete keys from an array if it has no values?
eg, this:
[name] = Array
(
[0] =
that only works for numerical indices.
However, if you're sure that neither null values, nor false values are
supposed to be present in the array, (that means, they MIGHT be, but
should be removed anyway; or just not be there at all,) then you could
try array_filter with no callback-argument :)
coder would go for help FIRST, but it doesn't
always solve a problem thats why there is a thing called MAILING LIST. :)
cheers.
- Original Message -
From: Leif Gregory [EMAIL PROTECTED]
To: php-general@lists.php.net
Sent: Thursday, January 13, 2005 7:39 AM
Subject: Re: [PHP] delete part
To view the terms under which this email is distributed, please go to
http://disclaimer.leedsmet.ac.uk/email.htm
On 13 January 2005 05:28, Matthew Fonda wrote:
use the unset() function.
for ($i = 0; $i count($array); $i++) {
if (empty($array[$i]) {
crap - hit 'reply' by mistake.
---
Leif Gregory wrote:
Hello Jochem,
Wednesday, January 12, 2005, 8:08:09 PM, you wrote:
JM read the manual entry first (see below) - and understand what the
JM function actually does - never just assume because its giving you
JM the result you want now that
Ford, Mike wrote:
snip
Without actually running it (I'm too lazy!), I'm pretty sure this won't work
correctly -- the count($array) is being recalculated each time round the
loop, so each time you do an unset() it will reduce by one, resulting in the
last few elements never being checked.
/snip
Not
Hello Jochem,
Thursday, January 13, 2005, 10:55:35 AM, you wrote:
J heh but who says I'm not a bar steward ;-)
grin I'll take a beer then! I need one after today.
J sorry if it came accross a little harsh, but I stand by the point
J that the onus is on the person asking the question to give an
how do i delete keys from an array if it has no values?
eg, this:
[name] = Array
(
[0] = grape
[1] = apple
[2] =
[3] = orange
[4] =
[5] = cherry
)
to:
[name] = Array
(
[0] = grape
[1] = apple
[2] = orange
[3] = cherry
)
--
Sebastian wrote:
how do i delete keys from an array if it has no values?
eg, this:
[name] = Array
(
[0] = grape
[1] = apple
[2] =
[3] = orange
[4] =
[5] = cherry
)
to:
[name] = Array
(
[0] = grape
[1] = apple
[2] = orange
[3] =
Hello Sebastian,
Wednesday, January 12, 2005, 5:22:20 PM, you wrote:
S how do i delete keys from an array if it has no values?
S eg, this:
array_merge($name);
Try it that way first. If not,
$name = array_merge($name);
But I think I remember the first way working for me.
Cheers,
Leif
Sebastian wrote:
how do i delete keys from an array if it has no values?
eg, this:
what does the value have to do with it??? other than that you want to
remove items where the value is 'empty'.
also 'no value' is vague, do you mean an empty string or do you mean NULL?
---
try the array_values()
Leif Gregory wrote:
Hello Sebastian,
Wednesday, January 12, 2005, 5:22:20 PM, you wrote:
S how do i delete keys from an array if it has no values?
S eg, this:
array_merge($name);
Try it that way first. If not,
read the manual entry first (see below) - and understand what the
function actually
1 - 100 of 242 matches
Mail list logo