Whether One-line comment begin with pound sing(#) in php?
Answers were Sorted based on User's Feedback
Answer / sona
Yes we can give # or // for oneline command
example
//hai
#echo "hai";
Is This Answer Correct ? | 14 Yes | 2 No |
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 |
What is the delimiter syntax is PHP's default delimiter syntax
Which functions are used to count the total number of array elements in php?
Can we use session in mvc?
How is session id stored in browser?
How do I check environment variables?
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'); ?> . . . =================================
What is __ construct in php?
How to set a page as a home page in a php based site?
What new features php7 has in store for us?
I am trying to assign a variable the value of 0123, but it keeps coming up with a different number, what is the problem?
can anyone explain about stored procedure,Triggers and transaction in php?
What is the special meaning of __sleep and __wakeup?