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 Like 18 Dislike
Previous forums Next forums
Other forums

double and single quotes in text fields acting up... help please
Single quotes, when entered into a text field, create an sql error upon Submit. It seems to create t

Find only certain URLs from page ... regex (semi-complete script)
Hi guys,

What I need to do is take a page & extract all the URLs from the page &a

How do I use ValidatorCallout extender in Login control?
Hi,I'd like to customize the look and feel of the login control a little bit. One thing I'd love to

Warning: mysql_num_rows() expects parameter 1
When i add quote at the end of this link
example:http://localhost/articlemania/category.php?cid=3

Problems with array
This code is the last lines in an upload script that uploads 4 images at the same time and writes th

Preg_match unknown modifyer
Hello,

Im trying to write a little script for my forums i need to get the reply from my forum

Filename and Line Number Custom Error
I have a class, with a method that accepts 2 parameters. I would like to output error messages.

big pagination problem in php
<?php

$connect = mysql_connect("localhost", "root", "")

unexpected T_STRING
error log "[Sat Jan 09 18:27:58 2010] [error] [client 127.0.0.1] PHP Parse error: syntax error

my login script page is not working on remote computers
hi my login is working on my computer, but when i tried 2 computers from 2 different locations, they

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash