Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Noob's doubt on echo function in php
#1
I have just started to learn some php via internet,
I just went through the very basics of php,
I studied some echo functions inside the php,while i tried to practice them
I got strucked,this is the code i tried

Code:
<?=php
echo "why is this","echo script","not working!!";
?>

and i got this error

Code:
Parse error: syntax error, unexpected T_ECHO, expecting ',' or ';' in C:\xampp\xamp\echo11.php on line 2


I am just a noob to php,so just bear with me ,

and try to help me to solve this error....
Reply
#2
<?php
echo = "why is this echo script not working!!";
?>

You added a =
The Rules!
FTW Forum <-- Home of the Damned! --> Join me On MM


Reply
#3
Code:
<?php
echo = "why is this echo script not working!!";
?>

You added a =

Thanks bro,issues has been fixed,Thank you once again for your kindly help...
Reply
#4
Well, that would work kind of.

PHP Code:
<?="why is this echo script not working!!"?>

Small print hack using shorttags.
Reply
#5
You're full of answers, Orgy. How can "=" be used in substitute of <?php though?
Reply
#6
(12-06-2010, 01:30 AM).Shannon Wrote: You're full of answers, Orgy. How can "=" be used in substitute of <?php though?

It's not. <? is a legal (yet frowned upon) short tag, that works perfectly instead of <?php as long as you have short tags enabled in your php.ini

The = takes place of a print
[Image: TYzKF.png]
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  PHP Framework List: An Ultimate Guide to 102 PHP Frameworks for Web Developers tk-hassan 0 777 07-27-2020, 11:26 PM
Last Post: tk-hassan
  PHP echo contents of folder help DAMINK™ 3 1,056 06-01-2012, 04:07 PM
Last Post: DAMINK™
  [NEED HELP] PHP Form post, get, echo Đενɨаηсε™ 5 1,810 02-06-2012, 01:16 PM
Last Post: ★Cooldude★
  PHP Video Tutorials (PHP For Beginners) Eleqtriq 4 3,272 10-10-2011, 01:00 PM
Last Post: Greyersting
  PHP Echo HTML From MySQL Value? iMr 7 3,373 03-19-2011, 09:41 AM
Last Post: ★Cooldude★

Forum Jump:


Users browsing this thread: 1 Guest(s)