Whether One-line comment begin with pound sing(#) in php?

Answers were Sorted based on User's Feedback



Whether One-line comment begin with pound sing(#) in php?..

Answer / sona

Yes we can give # or // for oneline command

example

//hai
#echo "hai";

Is This Answer Correct ?    14 Yes 2 No

Whether One-line comment begin with pound sing(#) in php?..

Answer / nutan bhatnagar

There are three way to comment a code two are for single
line and one for mulitple line.

For Single line comment
// echo hello ;
# echo hello;

For Multiple line comment

/*

echo hello;
echo "Happy New Year - 2010"
*/

Is This Answer Correct ?    7 Yes 2 No

Post New Answer

More PHP Interview Questions

What is the delimiter syntax is PHP's default delimiter syntax

0 Answers  


Which functions are used to count the total number of array elements in php?

0 Answers  


Can we use session in mvc?

0 Answers  


How is session id stored in browser?

0 Answers  


How do I check environment variables?

0 Answers  






i start a new session with : session_start(); then i set some session variable like this : $_SESSION['name']=$_POST['name'];\ and some another variables. at bottom of page i set header to diffrent page : header('location: index.php'); exit(); now in new page (index.php i can't access to my session variables, like $_SESSION['name']) what's wrong ? thanks. here is my files : a.php ======================================== session_start(); require ('config.inc.php'); if(isset($_POST)) foreach($_POST as $v=>$k) { $items[$v]=$k; } $sql="SELECT * FROM members WHERE username='{$items['user']}' AND pass=MD5('{$items['Password']}') "; $res=mysql_query($sql); $row=mysql_fetch_assoc($res); if($row['username']) { $_SESSION['type']=$row['type']; $_SESSION['name']=$row['name']; $_SESSION['family']=$row['family']; $_SESSION['username']=$row['username']; $_SESSION['date']=$row['date']; } header('location: admin.php'); exit(); ====================================== admin.php ===================================== <?php session_start(); if(!isset($_SESSION['admin'])) { header('location: index.php'); exit(); } require ('config.inc.php'); ?> . . . =================================

5 Answers  


What is __ construct in php?

0 Answers  


How to set a page as a home page in a php based site?

0 Answers  


What new features php7 has in store for us?

0 Answers  


I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what is the problem?

0 Answers  


can anyone explain about stored procedure,Triggers and transaction in php?

2 Answers  


What is the special meaning of __sleep and __wakeup?

0 Answers  


Categories