Beruflich Dokumente
Kultur Dokumente
2 ways:
a) sizeof($array) - This function is an alias of count()
b) count($urarray) - This function returns the number of
elements in an array. Interestingly if you just pass a
simple var instead of an array, count() will return 1.
How can we find the number of rows in a result set using PHP?
Answer1
Here is how can you find the number of rows in a result set
in PHP: $result = mysql_query($any_valid_sql,
$database_link); $num_rows = mysql_num_rows($result); echo
“$num_rows rows found”;
Answer2
<?php //first establish connection with database
mysql_connect("localhost","root","");
mysql_select_db("demoprj");
// then write the query suppose our table is tbl_student
$sql_stu="select* from tbl_student";
$res_stu=mysql_query($sql_stu);
$rows_stu=mysql_num_rows($res_stu);
echo"number of rows in tbl_student are=".$rows_stu;
?>
1.file_uploads
2.upload_max_filesize
3.max_input_time
4.memory_limit
5.max_execution_time
6.post_max_size
What IS PHP?
Answer
PHP: Hypertext Preprocessor, an open source, server-side,
HTML embedded scripting language used to create dynamic Web
pages. In an HTML document, PHP script (similar syntax to
that of Perl or C ) is enclosed within special PHP tags.
Because PHP is embedded within tags,And, because PHP is
executed on the server, the client cannot view the PHP code.
PHP can perform any task!
Answer
PHP:Preprocessor Hypertext or Personal Home Page open
source,server side script language used to create
software,sites.We can combine the PHP code with HTML with
the help of tags <? ?>.
why header() gives the error like header already sent in php
please explain in brief
Answer
Generally it gives error when u print or echo some content
before header() or setcookie() methods.