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 array_diff weirdness I'm using the following bit of code $diff = array_diff($pids, $pidlist); $diff = array_va
How can I get my program to read a larger array ?? Hi:
I have this program that reads from an array to do calculations. The array are just t
bit of help needed Im about to sort out my registration page for my website by customising a "registration" s
Splitting Attributes SQL> SELECT I_NAME, substr(I_NAME,1,instr(I_NAME,'O')) "First part",
substr(I_NAME, IN
How to separate records and ORDER BY Let say i have 100 records and displayed in one page, then i want to get the records from 50-100 and
PHP Code reffering to database, doing something wrong.. pls help Well i am quite new with PHP and for school we have to make a PHP script which reffers to a Data
Count of reciepients in php mailer How can i sent a mail to large no of reciepients say 10,00,00 Using PHP MAILER
Onclick problem in Firefox Hi, I am using a . It doesn't seem to
PHP If Else statement for breadcrumb Hi I am trying to use a PHP if else statement to display a breadcrumb link on wordpress
Paypal Hi all, I have an advanced basic knowledge of php I want to try something new for a s