ellescuba27
Member
- Messages
- 273
- Reaction score
- 3
- Points
- 18
Please help right away! In PHP I am using MySQL and fetching the rows from a MySQL database. When I try to write this to the page, it writes "key error" and stops writing the rest of the page. Code where it seems to fail:
($isdisplayarticlewritten is the fetched row, $towrite is to be printed elsewhere on the page)
---------- Post added at 05:04 AM ---------- Previous post was at 04:57 AM ----------
NVM, I got this one. I put in the wrong key. PHP was expecting a string, I set it to an interval. All fixed.
Code:
print "<tr><td style=\"background: url('crumpled".rand(1, 5).".jpg') repeat;\"><a name=\"$isdisplayarticlewritten[0]\"></a>";
$towrite .= "<h1>".str_replace("\n", "<br>", htmlentities($isdisplayarticlewritten[2]))."</h1>";
---------- Post added at 05:04 AM ---------- Previous post was at 04:57 AM ----------
NVM, I got this one. I put in the wrong key. PHP was expecting a string, I set it to an interval. All fixed.