sungpeng
-
Posts
290 -
Joined
-
Last visited
Posts posted by sungpeng
-
-
check with you why need to put {} in front and at the end of echo array ?
-
$days=array();
$days = array(
2=>array("hello","going") );
echo "$days[2][1]";
I can't get the value "hello" out. Please help..
-
$instclasses = mysql_query("SELECT * FROM people where (pid='$doin[pid]' OR cpid='$doin[pid]' ) AND (pid='$_POST[cpid]' OR cpid='$_POST[cpid]'"));
-
$instclasses = mysql_query("SELECT * FROM people where pid='$doin[pid]' OR cpid='$doin[pid]' AND pid='$_POST[cpid]' OR cpid='$_POST[cpid]'");
Am I getting the "or" "and" correct ?
-
My am creating a new page by itself and is named as a variable $uid.php
-
[function.fopen] failed to open stream: No such file or directory in
fwrite(): supplied argument is not a valid stream resource in
Two errors
-
$file = "$uid.php"; $open = fopen($file, "w"); fwrite($open, $content); fclose($open); }
The above code is working fine. If I am putting it in the folder, how should i code ? Like the below which generate error message.
$file = "/page/$uid.php"; $open = fopen($file, "w"); fwrite($open, $content); fclose($open); }
-
Thk you kicken guru
-
content= '$sql = mysql_query("SELECT * FROM instructors WHERE name='$uid' AND passwd='$pwd' "); ';
This doesn't work bec the $uid is wrapped ' '.
how to code this using backslash?
-
$content = "hello";
$content = 'hello';
possible to wrap it in other ways and works like
$content =(hello);
$content=*hello*;
Any suggestions ?
-
<a href='class.php?pid=$doin[pid]&id=$instc[id]'>
If passing two variables to next page, how should i code?
-
Thanks..
-
$value = array(1=apple; 2=orange); I think is not necessary to add an additional > as = will do the job. Do you think in this way also ?
-
I saw something like $value = array(1=>apple; 2=>orange);
What does => stand for in this context ?
-
What is the different between => and >= in php ?
-
Thank you
-
Just use the second one variable interpolation. Why people consider using the first one concatenation ? Much more lengthy. The two dots are with the variable and not with the string.
-
why sometime written in this way $message = ' Payment status: '.$payment_status.' ';
Sometime in another way $message =" Payment status: $payment_status "; more simple and better
-
Thank you
-
Sometime it don't require the two dots ?
-
.$variable.
I am also wondering why sometime need to add two dot before and after a variable ?
-
.=
I am wondering why sometime it is require to add a dot before the equal in php?
-
<?php class MyClass{ private $iLog = 'winning'; public function MyFunction($log){ $this->iLog = $log; return $this->iLog; } } MyClass=new MyClass; MyClass->MyFunction($log); ?>
Don't work?
-
<?php $storedvar['db_table_log']='winning'; class Event1{ function Event2(){ global $storedvar; $this->log = $storedvar['db_table_log']; echo "$this->log"; } } Event1=new Event1; Event1->Event2(); ?>
Can check with you how come this coding don't work?
Echo Multi Dimensional Array Out
in PHP Coding Help
Posted
Could you explain further on 0-indexed ?
Is 1-indexed come with " " ?
How about 2-indexed ?