Dave Carrera wrote:
How would I show 100 chars after finding the first instance of a searched
word in a string.
$start = strpos('hello',$str);
$hundredchars = substr($str,$start,100);
--
---John Holmes...
Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
php|architect: The Magazine for PHP
Put quotes around the value attribute of your input tag, for example
Mukta Telang wrote:
Hi,
if a string is:
$x="A.B. XYZ";
and if I post it as a hidden form control and echo $_POST['x'] then I
get:
A.B.
and not "A.B. XYZ" !
What should I do?
Mukta
--
The above message is enc
On Wed, 2003-06-11 at 10:42, Mukta Telang wrote:
> Hi,
> if a string is:
> $x="A.B. XYZ";
> and if I post it as a hidden form control and echo $_POST['x'] then I
> get:
> A.B.
> and not "A.B. XYZ" !
> What should I do?
> Mukta
$x = 'A.B. XYZ';
--
PHP General Mailing List (http://www
At 16:42 11-6-03, you wrote:
if a string is:
$x="A.B. XYZ";
and if I post it as a hidden form control and echo $_POST['x'] then I
get:
A.B.
and not "A.B. XYZ" !
What should I do?
how do you assign the value to the hidden form element?
--
PHP General Mailing List (http://www.php.net
> if a string is:
> $x="A.B. XYZ";
> and if I post it as a hidden form control and echo $_POST['x'] then I
> get:
> A.B.
> and not "A.B. XYZ" !
> What should I do?
Learn HTML. Use quotes around your attribute values:
---John W. Holmes...
Amazon Wishlist: http://www.amazon.com/o/reg
or ...
while($new = substr($old, $i++ * $strlen, $strlen)) $array[] = $new;
Tim Ward
www.chessish.com
> -Original Message-
> From: Richard Baskett [mailto:[EMAIL PROTECTED]]
> Sent: 31 July 2002 20:47
> To: Randy Johnson; PHP General
> Subject: R
Hi Randy,
Just copy the following code and execute it, it works as you
require, tested works fine.
string$i : $strDiv[$i]";
}
?>
- JFK
kishor
Nilgiri Networks
On Wed, 31 Jul 2002, Randy Johnson wrote:
> Hello,
>
> I would lik
";
?>
Rick
A sense of humor can help you over look the unattractive, tolerate the
unpleasant, cope with the unexpected, and smile through the unbearable. -
Moshe Waldoks
> From: "Randy Johnson" <[EMAIL PROTECTED]>
> Date: Wed, 31 Jul 2002 15:26:15 -0400
> To: <[EMAIL PROTECTED]>
> Subject: [PHP
Give this a whirl:
\n";
}
?>
I haven't tested it, but in theory it should find the length of the string (26), loop
through it as long as $i is less than 26, incrementing 8 at a time. Each time it goes
through, $str_array[] is fed a new element, which is a substring of $string that
starts at
check out php.net/number-format
Sincerely,
Maxim Maletsky
Founder, Chief Developer
PHPBeginner.com (Where PHP Begins)
[EMAIL PROTECTED]
www.phpbeginner.com
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Saturday, February 24, 2001 4:53 AM
To: [EMA
Use number_format() :
http://www.php.net/manual/en/function.number-format.php
echo number_format($number);
Other options exist with this function, it's pretty useful.
Regards
Philip Olson
http://www.cornado.com/
On Fri, 23 Feb 2001 [EMAIL PROTECTED] wrote:
> I have a string that
11 matches
Mail list logo