Why is this codes output an Error?

Posted by Ari Susanto on Stack Overflow See other posts from Stack Overflow or by Ari Susanto
Published on 2012-11-12T04:54:28Z Indexed on 2012/11/12 4:59 UTC
Read the original article Hit count: 328

Filed under:
|

I am a newbie on php writing. In the my first trying, I get a problem on input a html tag to php.

This code output an error:

<?php
$a="Begin";
$b=12;
echo $b . " " . $a . " " . "This is php file <br/>";
echo strlen($a);
echo strpos($a,"in") . "<br/>";
echo addcslashes($a,"i")";
?>

this is the error message I get:

Parse error: syntax error, unexpected '"', expecting ',' or ';' in /home/specials/public_html/bextool.com/1.php on line 7

Is there any body who can explain about it?

© Stack Overflow or respective owner

Related posts about php

Related posts about html