Quick Syntax Question
Posted on
16th Feb 2014 07:03 pm by
admin
Hi folks,
I'm getting the following error: "unexpected T_LNUMBER". I'm trying to build a dynamic table in PHP it was working great until I attempted to include a java reference in one of my links. A watered down version of the code is as follows:
Code: $apps_html = '<table>';
$apps_html.= '<tr class="tableHeader">';
$apps_html.= '<th scope="col">VIEW</th>';
$apps_html.= '<th scope="col">TITLE</th>';
$apps_html.= '<th scope="col">DATE MODIFIED</th>';
$apps_html.= '<th scope="col">STATUS</th>';
$apps_html.= '<th scope="col">EDIT</th>';
$apps_html.= '<th scope="col">DELETE</th>';
$apps_html.= '</tr>';
$apps_html.= '<tr class="tablerow2">';
$apps_html.= '<td><a href="link.php">view</a></td>';
$apps_html.= '<td>' . $var1 . '</td>';
$apps_html.= '<td>' . $var2 . '</td>';
$apps_html.= '<td>' . $var3 . '</td>';
if($var1 == 'PENDING'){
$apps_html.= '<td><a href="delete.php">delete</a></td>';
}else{
$apps_html.= '<td><a href="window.html" onclick="popUp(this.href,'200','400'); return false;"></a></td>';
}
$apps_html.= '</tr>';
$apps_html.= '</table>';
The document body looks something like this:
Code: <html>
<head>
<title>I hate java</title>
</head>
<body>
<?php echo $apps_html; ?>
</body>
</html>
The problem is with this line obviously:
Code: $apps_html.= '<td><a href="window.html" onclick="popUp(this.href,'200','400'); return false;"></a></td>';
Can anyone help me with the correct syntax to include java variables in my href? Thanks for your time!
No comments posted yet
Your Answer:
Login to answer
68
18
Other forums
Please help - should be a simple fix.. driving me nuts
Everything seemed to be working fine. I have a table, it alphabetically lists a bunch of cities and
Drawing Images in classes
I'm quite new to Object Oriented PHP. What I'm trying to do is draw some images but also have other
Breaking results into week blocks
I have a set of dates (and times), which are returned from a mySQL query.
These usually span
Saving data from a form into a file
Hey everybody,
Sorry, I am really new to PHP coding and such but a project kind of got thrust
Php Mysql Page Loading Notice
Hi all,
I was wondering if there is a way (Sure there is) of showing a message or an image wh
Record count of entire database
Does anyone know if there is a way to obtain the number of records in each table of the database usi
undefined offset help
Hi All,
I kept getting undefined offset PHP notice for a simple for loop. For eg
$va = arr
Ajax not working on IE 6 for Windows CE
I've created a webpage which uses the classis Ajax in following format:view plaincopy to clipboardpr
How to change Time Zone
HI
I want to change the time zone of the server to another country.How can do that?
Thanks
Time-based image rotation script
I'm trying to write a PHP script that rotates an image based on what time of day it is. I want the