0

I get a error like

Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)

for the below code..

$string="<b style=margin-left:30px;font-size:12px;font-weight:bold>"."< a href='tracklocation.php?deviceid=<?=$row['device_id']?>&vno=<?=$row['vehicle_no']?>'>". $row['vehicle_no']."</br>  ";

1 Answer 1

0

this should do it

$string="<b style=margin-left:30px;font-size:12px;font-weight:bold>"."<a href='tracklocation.php?deviceid={$row['device_id']}&vno={$row['vehicle_no']}'>". $row['vehicle_no']."</a></br>";

please notice that instead of using <?= $variable ?> if used {$variable} to escape parsing the varibale as a string, if you insisted on using <?= $variable ?> then you should use <?= echo $variable; ?>

Sign up to request clarification or add additional context in comments.

1 Comment

Can you explain what you have changed? It makes your answer understandable.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.