i may be wrong but as i understand that you want to check whether a
array holds any value or not --> for this u can use COUNT function of
array which will count the values of the array.
with best wishes
balwant
On Sat, 2005-01-29 at 06:29, Craig Hoffman wrote:
> Hi There,
> I am trying to write
Craig Hoffman wrote:
Hi There,
I am trying to write an if statement to see if an array has any values
in it and if it does do something.
for example:
$ticklist2 = array("'$values")
if (array_values(empty($ticklist2))){
empty() is used to check whether a var isset
and is not null, "" or false
Hi There,
I am trying to write an if statement to see if an array has any values
in it and if it does do something.
for example:
$ticklist2 = array("'$values")
if (array_values(empty($ticklist2))){
do something
} else {
do something else
}
I just can't get this to work. Any help would be gre
Martin Norland wrote:
Jochem Maas wrote:
Jochem Maas wrote:
Underodog H.R. wrote:
Sorry for using the list in this way, wont happen again.
I just noticed that they crossposted rather than post twice.
That's three times now I've seen the statement that it won't happen again!
Unforgivable!
Seriously
Thanks, I did use your code as is, and it works perfectly.
Regards,
Chip
"Bastien Koert" <[EMAIL PROTECTED]> wrote on 01/28/2005 09:56:35 AM:
> What you should do then is to compare some value to only write the image
> data if that value matchesin my code snippet, since you are writing
the
What you should do then is to compare some value to only write the image
data if that value matchesin my code snippet, since you are writing the
same data, i just loop thru it and increment the image counter to output the
correct image. A better way to manage this might be to put the image n
Thanks for the tips.
I find this confusing - I have 3 statements pulling 3 differant images, so
I don't understand why the script would run 3 times if there is not loop
telling it to do so. Shouldn't it just load each image and then stop?
Doesn't the while loop stop when it hits the last row?
-
Chip Wiegand wrote:
Okay, so I have got the php bits working in this web page but it is
running 3 times every time the page loads, and I see no reason why (I have
opened this page in two differant browsers). The code for the entire page
is pasted below, it includes some calls to include files wh
it runs three times because there are three rows of data and you are setting
the same thing for each set of data.
try this
while ( $row = mysql_fetch_array($result))
{
printf("%s", $row["alt-text"],
$row["title-text"], $row["desc-text"]);
$x++;
}
?>
bastien
From: Chip Wiegand <[EMA
Okay, so I have got the php bits working in this web page but it is
running 3 times every time the page loads, and I see no reason why (I have
opened this page in two differant browsers). The code for the entire page
is pasted below, it includes some calls to include files which are not
include
On Fri, 2005-01-28 at 14:21 +, Mark Benson wrote:
> Is there an easy way to search and replace/remove characters in a string in
> PHP?
www.php.net/str_replace , www.php.net/preg_replace . You can strip out
the - characters with str_replace("-", "", $string);
--
Josip Dzolonga,
dzolonga at m
Robert Twitty wrote:
> The problem is caused by the fact that the sybase extension was installed
> instead of the mssql extension. The sybase extension supports some of the
> mssql functions via aliasing. Unfortunately, mssql_init() is not supported
> by the sybase ext. You basically have only 2
Mark Benson wrote:
I am having problems with entering data into MySQL from a PHP script. I am
taking the data from an array generated by a CSV parsing routine. That in
itself works great, however I have large number of data units with '-'
characters in (hyphens) and it is causing the SQL queries
sure, lots of way, regex replacement, str_replace, etc
but its strange that a hyphen is causing an error.
can you post some code?
Bastien
From: Mark Benson <[EMAIL PROTECTED]>
To: php-db@lists.php.net
Subject: [PHP-DB] Hyphens and MySQL
Date: Fri, 28 Jan 2005 14:21:34 +
I am having problems wit
Jochem Maas wrote:
Jochem Maas wrote:
Underodog H.R. wrote:
Sorry for using the list in this way, wont happen again.
I just noticed that they crossposted rather than post twice.
That's three times now I've seen the statement that it won't happen again!
Unforgivable!
Seriously though - their name i
I am having problems with entering data into MySQL from a PHP script. I am
taking the data from an array generated by a CSV parsing routine. That in
itself works great, however I have large number of data units with '-'
characters in (hyphens) and it is causing the SQL queries to dump out with a
Jochem Maas wrote:
Underodog H.R. wrote:
Sorry for using the list in this way, wont happen again.
wtf. 'they' posted it twice with the same message... thats the
definition of 'again'.
I just noticed that they crossposted rather than post twice.
--
PHP Database Mailing List (http://www.php.net/)
To
Underodog H.R. wrote:
Sorry for using the list in this way, wont happen again.
wtf. 'they' posted it twice with the same message... thats the
definition of 'again'.
the fact that 'they' can't even spell their company name correctly
would make me think twice about working there ;-)
Underodog H.R. <[
18 matches
Mail list logo