Shaun wrote:
Hi,
The following code matches all occurences of tags within an html page
and wraps form tags around it:
echo preg_replace(
'/]*>(.*?)<\/p>/ms',
'action="'.$CFG->edit_pages_adm.'/index.php?action=edit_paragraph"
method="post">
$1
',
file_get_conte
Cookies, or browsersession. I found the latter to be very
easy to work with.
--
Kim Steinhaug
---
There are 10 types of people when it comes to binary numbers:
those who understand them, and those who don't.
-
> I am trying to figure an accurate way to calculate how many users are
> viewing a site, at any particular time. This task is very simple except
for
> one part - How do you determine when a person has left the site...apache
> hasn't served anymore requests from a particular ip for xx minutes ??
H
use mysql_fetch_rows();
$result="SELECT COUNT(*) FROM pet";
$sql=mysql_query($result);
$number_of_rows = mysql_fetch_rows($sql);
while ($row=mysql_fetch_array($sql)){
$pet_name=$row['pet_name'];
echo ..;
}
Craig Roberts
"Yury B ." <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Antti wrote:
How can I count how many code lines I have written? I have many php
files in one directory. I'm using linux.Do you know any non-php way to
count the lines.
from a directory one level above where all your files lie do this:
(assuming all you files are in a directory called php)
#l
> I am wanting to do a count in PHP. I want to be able to count the number
of
> records from a given database and display this count on the page. Can this
> be done using PHP or is the sql thing?
If you're using MySQL - I don't know if COUNT() is a part of SQL'92 - you
can use SELECT COUNT(*) FRO
>I have a function that resets the count of fields with certain values when
>called. 99.9 percent of the time it works fine. However occaisionally it
>wont update the database. Even after breaking the selects up it still fails
>sometimes. If anyone has an idea of why I would really appreciate hear
>I have a php-script with which one can download a file with a specific format
>like this:
>
> header("Content-type: application/specific");
> header("Content-Disposition: attachment; filename=$name.sqrfld");
> echo ("output funny stuff...");
>
>and i will count the number of downloads in a datab
$sql = "SELECT COUNT(*) AS myCount FROM Products";
$result = mysql_query($sql);
$count = mysql_result($result,0);
--- Kevin P <[EMAIL PROTECTED]> wrote:
> I have counted some rows in MySQL and I need to know how
> to pull out the
> number of rows.
> "SELECT COUNT(*) AS myCount FROM Products"
>
>
I have counted some rows in MySQL and I need to know how to pull out the
number of rows.
"SELECT COUNT(*) AS myCount FROM Products"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list
[EMAIL PROTECTED] (Jeremy Morano) wrote:
> Hi, I was woundering how to read and find the # of records in my table...
> Do I use count()???
yes
select count(*) from table
--
Henrik Hansen
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additi
it's important to remember that what you have here is NOT a 2d array. $array
is an array, each element of which can be any sort of variable ...
e.g.
$array[1] = "fred";
$array[2] = Array();
$array[3] = 1.245;
... but then try ...
foreach ($array as $thisarray)
echo(count($thisarray) . ""
12 matches
Mail list logo