You are here: Truly bizzare 'echo' problem « PHP Programming Language « IT news, forums, messages
Truly bizzare 'echo' problem

Posted by fiziwig on 11/18/95 11:42

This was origianlly one line and was acting strange so I divided it
into three lines and it still acts the same strange way:

Code, cut and pasted from script:

....
$rec_count=$_GET['rc'];
$start=$_GET['sp'];
echo 'Records ' . $start+1;
echo ' through ' . $start+$per_page;
echo ' of ' . $rec_count . '<p>';
....

emitted HTML cut and pasted from the browser:

135 of 49<p>

$start is 0, $per_page is 35 and $rec_count is 49.

This is at the outermost leve, not inside any conditionals, and in
desparation I even stripped out nearby comments. What am I missing
here? the word 'of' gets echoes fine but the other words don't get
echoed at all. I'm really stumped.

Finally, I cut and pasted those three lines along with setting the
variables into an completely empty file that looks like this:

<html>
<head>
<title>temp</title>
</head>
<body>
<?
$start=0;
$per_page=35;
$rec_count=49;
echo 'Records ' . $start+1;
echo ' through ' . $start+$per_page;
echo ' of ' . $rec_count . '<p>';
?>
</body>
</html>

and the emitted HTML is still: 135 of 49<p>

instead of: Record 1 through 35 of 40<p>

FWIW: I'm doing this on a Yahoo/Geocities whosted web site.

--gary

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация