http://ca3.php.net/manual/en/function.substr.php is the function you want
bastien
From: Benjamin Adams <[EMAIL PROTECTED]>
To: PHP DB
Subject: [PHP-DB] Only a section from the database result
Date: Tue, 18 Jul 2006 13:24:51 -0400
I have articles in a MySQL database and I want crea
I have it working with left, Thanks everyone.
On Jul 18, 2006, at 1:57 PM, [EMAIL PROTECTED] wrote:
I have articles in a MySQL database and I want creating a fast brows
where people can read the beginning of the articles and select
the ones they want to read.
How do I only display the first
[EMAIL PROTECTED]
Sent: Martes, 18 de Julio de 2006 12:25 p.m.
To: PHP DB
Subject: [PHP-DB] Only a section from the database result
I have articles in a MySQL database and I want creating a fast brows
where people can read read the beginning of the articles and select
the ones they want to read.
Ho
Use the trim function, or anoter function that just takes the n first
characters.
-Original Message-
From: Benjamin Adams [mailto:[EMAIL PROTECTED]
Sent: Martes, 18 de Julio de 2006 12:25 p.m.
To: PHP DB
Subject: [PHP-DB] Only a section from the database result
I have articles in a
> I have articles in a MySQL database and I want creating a fast brows
> where people can read the beginning of the articles and select
> the ones they want to read.
>
> How do I only display the first say 50 chars of a 5000 char article?
>
> $count = 1;
> while(($row = mysql_fetch_array($News)) o
echo "" . substr($row['pagetext'], 0, 50) . "";
Regards,
Dwight
> -Original Message-
> From: Benjamin Adams [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 18, 2006 12:25 PM
> To: PHP DB
> Subject: [PHP-DB] Only a section from the database re
substr
Regards,
Dwight
> -Original Message-
> From: Benjamin Adams [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 18, 2006 12:25 PM
> To: PHP DB
> Subject: [PHP-DB] Only a section from the database result
>
> I have articles in a MySQL database and I want creating
I have articles in a MySQL database and I want creating a fast brows
where people can read read the beginning of the articles and select
the ones they want to read.
How do I only display the first say 50 chars of a 5000 char article?
$count = 1;
while(($row = mysql_fetch_array($News)) or ($c