Could the exit() be terminating it? Do you need this exit() as the
else for that if statement? Try deleting just the else {}.
JAT
Karl
Sent from losPhone
On Jun 5, 2010, at 6:54 PM, David Mehler dave.meh...@gmail.com wrote:
Hello,
I've got a while loop outputting values from a database.
Hi,
Thanks. I took out the entire else section including the exit call, it
now all processes, however $row['enddate'] is not displayed on the two
records where it is set.
Thanks.
Dave.
On 6/5/10, Karl DeSaulniers k...@designdrumm.com wrote:
Could the exit() be terminating it? Do you need this
So your code looks like this?
while($row = mysql_fetch_array($result3))
{
echo tr;
echo td . $row['name'] . /td;
echo td . $row['type'] . /td;
echo td . $row['startdate'] . /td;
if (!empty($row['EndDate'])) { //This should probably be $row
['enddate']
echo td . $row['enddate'] . /td;
}
echo
Could it be that you are not using the same variable name? In the if statement
you are using $row['EndDate'] and when attempting to print you are using
$row['enddate']. I think you need to be consistent about which capitalization
you use (and make sure it matches what is in the db).
if
Hello everyone,
Much thanks. Sometimes when you stare at code for so long it blurs
together, that's how it is with me at least. That was my problem, case
sensitive variable.
Thanks a lot.
Dave.
On 6/5/10, Mari Masuda mari.mas...@stanford.edu wrote:
Could it be that you are not using the same
If you want to see the contents of an array, use the print_r function:
http://www.php.net/print_r
HTH!
--Sam
Donpro wrote:
$emails =
array([EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]);
$addresses = explode(,,$emails);
for ($i=0; $i count($addresses); $i++) {
echo $i . ':
On Tue, 2004-02-24 at 12:51, Donpro wrote:
$emails = array([EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]);
$addresses = explode(,,$emails);
for ($i=0; $i count($addresses); $i++) {
echo $i . ': ' . $addresses[$i] . 'br';
if ($i == count($addresses) - 1)
Donpro mailto:[EMAIL PROTECTED]
on Tuesday, February 24, 2004 9:52 AM said:
$emails =
array([EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]);
$addresses = explode(,,$emails); for ($i=0; $i count($addresses);
$i++) { echo $i . ': ' . $addresses[$i] . 'br';
if ($i ==
Problem lines
if ($mo == 06 and $dy 01 and $dy 09) { $wd = 8; }
if ($mo == 06 and $dy 08) { $wd = 9; }
but if I change my date to 06/02 then no matter what I
try, $wd always gets the value of 9 (it should be 8 on this
date). It should
not get the value 9 until the 9th
At 01:08 30.04.2003, Beauford said:
[snip]
if ($mo == 06 and $dy 01 and $dy 09) { $wd = 8; }
if ($mo == 06 and $dy 08) { $wd = 9; }
[snip]
The problem is your notation. If you had written
if ($mo == 6 and $dy
think of any other
way of doing it.
Any suggestions?
Thanks
- Original Message -
From: Ernest E Vogelsinger [EMAIL PROTECTED]
To: Beauford [EMAIL PROTECTED]
Cc: PHP General [EMAIL PROTECTED]
Sent: Friday, May 30, 2003 7:39 PM
Subject: Re: [PHP] What's wrong with this code??
At 01:08
On Fri, 2003-05-30 at 20:02, Beauford wrote:
Your right though, the code is awkward - but I couldn't think of any other
way of doing it.
Any suggestions?
switch
http://us4.php.net/manual/en/control-structures.switch.php
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe,
]
To: Beauford [EMAIL PROTECTED]
Cc: PHP General [EMAIL PROTECTED]
Sent: Friday, May 30, 2003 9:18 PM
Subject: Re: [PHP] What's wrong with this code??
On Fri, 2003-05-30 at 20:02, Beauford wrote:
Your right though, the code is awkward - but I couldn't think of any
other
way of doing it.
Any
Ahh, so you can use \\n within the regex itself...I was thinking that what
was capture in the regex itself wasn't available until the replace part.
Obviously that's not true ;)
Thanks alot, everyone! One problem down, all the other one's to go :)
Plutarck
Christian Reiniger [EMAIL PROTECTED]
In article 9eb4nf$pdf$[EMAIL PROTECTED],
[EMAIL PROTECTED] (Plutarck) wrote:
$file = eregi_replace(script.*.*/script, !-- RWW: Scripting
killed --, $file);
But I use PCRE functions, so I don't want to use ereg in one place and PCRE
in another, so I tried:
$file =
But I use PCRE functions, so I don't want to use ereg in one place and PCRE
in another, so I tried:
$file = preg_replace(#script.*.*/script#i, !-- RWW: Scripting
killed --, $file);
'/script.*.*?\/script/i'
-Rasmus
--
PHP General Mailing List (http://www.php.net/)
Since there is a / in the code itself, I use # as a delimiter instead so
I don't have to escape it, making it harder to read.
So here's the code:
$file = preg_replace(#script.*.*/script#Ui, !-- RWW: Scripting
killed --, $file);
Which works...kinda. But here's the weird thing. This is a piece
On Monday 21 May 2001 16:23, Plutarck wrote:
Since there is a / in the code itself, I use # as a delimiter
instead so I don't have to escape it, making it harder to read.
So here's the code:
$file = preg_replace(#script.*.*/script#Ui, !-- RWW: Scripting
killed --, $file);
Stupid error
Doh!
I read the part about what . does and it didn't even register that it
won't match newlines.
Well now that part works ;)
And now one more bit. For instance to kill an onclick event I use:
$file = preg_replace(#(.*)onclick=\.*\(.*)#isU, \\1\\2, $file);
Which works, kinda. Problem is,
On Tuesday 22 May 2001 05:06, Plutarck wrote:
And now one more bit. For instance to kill an onclick event I use:
$file = preg_replace(#(.*)onclick=\.*\(.*)#isU, \\1\\2,
$file);
Which works, kinda. Problem is, consider this:
onclick='somecode()'
It's not caught, because it only catches
Tyler Longren wrote:
$file = fopen(includes/about.inc, r);
$data = fread($file, 2400);
[..]
Any ideas why that doesn't work on one server but it will work on
another server? The server it works on is Win2k, IIS5, php4.0.4pl1.
The server it doesn't work on is Linux, Apache, php4.0.4pl1.
I think you need to specify the full path rather than relative when using
fopen eg:
$file = fopen(/usr/local/apache/htocs/includes/about.inc, r);
Chris
Alexander Wagner wrote:
Tyler Longren wrote:
$file = fopen(includes/about.inc, r);
$data = fread($file, 2400);
[..]
Any ideas why
On Monday 23 April 2001 08:59, Alexander Wagner wrote:
Tyler Longren wrote:
$file = fopen(includes/about.inc, r);
$data = fread($file, 2400);
$file = includes/about.inc;
if ($fp = fopen($file,r)) {
$data = fread($fp,filesize($file));
fclose($fp);
}
ought to work.
--
php
23 matches
Mail list logo