Le 22/04/2010 19:29, Paul Halliday a écrit :
I found some long functions to achieve this but I couldn't help but
think that it could be done in a couple lines.
Possible?
http://us.php.net/manual/en/function.wordwrap.php
--
Mickaël Wolff aka Lupus Michaelis
http://lupusmic.org
--
PHP General
Thank you Stian!
In Swedish they say "Sometimes you can't see the forest by all the
trees."
/frank
2005-02-24 kl. 09.45 skrev Stian Berger:
On Thu, 24 Feb 2005 09:14:32 +0100, Frank Arensmeier
<[EMAIL PROTECTED]> wrote:
Hello everybody!
I was wondering if you could help me with a little problem
On Thu, 24 Feb 2005 09:14:32 +0100, Frank Arensmeier
<[EMAIL PROTECTED]> wrote:
Hello everybody!
I was wondering if you could help me with a little problem I ran into
some days ago.
In my database I have some information about file paths. Originally,
those paths come from a Windows Excel sp
On Sat, 21 Aug 2004 12:54:15 -0500, Shawn McKenzie <[EMAIL PROTECTED]> wrote:
> Turbo wrote:
> > Hi,
> >
> > I have array variable and string variable.
> > I want to replace value of array by key of array in string variable
> > with preg_replace().
> >
> > Example :
> > $message=array(
> > 'name'=
Turbo wrote:
Hi,
I have array variable and string variable.
I want to replace value of array by key of array in string variable
with preg_replace().
Example :
$message=array(
'name'=>'My Computer',
'version'=>'1.0'
);
$strValue="I am $name,build version $version\n";
How's to replace?
Yingyos
Why
* Thus wrote Justin Patrin:
> On Fri, 30 Jul 2004 23:14:53 +0100, Harlequin
> <[EMAIL PROTECTED]> wrote:
> > Henri.
> >
> > I prefer to use CSS for things like this but I'm sure PHP has it's own
> > idiosyncrasies.
> >
> > I checked out the site posted in response to your post and personally
> >
On Fri, 30 Jul 2004 23:14:53 +0100, Harlequin
<[EMAIL PROTECTED]> wrote:
> Henri.
>
> I prefer to use CSS for things like this but I'm sure PHP has it's own
> idiosyncrasies.
>
> I checked out the site posted in response to your post and personally
> thought the graphics were a bit ropey.
>
> ty
Henri.
I prefer to use CSS for things like this but I'm sure PHP has it's own
idiosyncrasies.
I checked out the site posted in response to your post and personally
thought the graphics were a bit ropey.
typically CSS is used for replacing images or backgrounds on hover but is
very flexible and q
Then, once I have determined there are more than one dot, how can I
remove all the dots but the right most one?
You can replace a limited number of matches using preg_replace().
$number = '123.456.789.10';
$count = substr_count($number, '.');
$number = preg_replace('/\./', '', $number, $count -
If you're doing this to pass it through a URL, then use urlencode()
http://www.php.net/urlencode
Vernon wrote:
I want to be able to replace a space that comes from a form field (such as
in 123 My Street) with a + sign.
Can anyone help me with this?
Thanks
--
Regards,
Ben Ramsey
http://benramsey
Depending on the use you might also want to look at this one :
htmlentities()
If working with mySQL inserts consider this aswell :
mysql_escape_string()
And finally, javascripts in HTML doesnt like either the ' " or the
equivilant htmlentities. I just wash them away direkt if i need to
output som
final note, for anyone who finds this interesting
in the class, if you update the following 2 variables, this is the proper
list
$this->countrys =
array("",".ac",".ad",".ae",".af",".ag",".ai",".al",".am",".an",".ao",".aq","
.ar",".as",".at",".au",".aw",".az",".ba",".bb",".bd",".be",".bf",".bg",".
on Wed, 3 Dec 2003 10:54:10 +1100 Luke wrote:
L> result on my laptop for default script settings
L> (P4 2.66, 512mb ram)
L> 20
L> loaded in: 1.3158s
thanks for the test..
L> please tell me what you think of this? if you like it i can email it to you
L> (as a php file)
Looks good, I have alr
i forgot to mention, that being a class, you should be able to set any of
the variable you want (either on class creation: new honeyPot($value1,
$value2, etc); or with the class variables, $spambot = new honeyPot;
$spambot->addresses = 50; //amount to create)
Luke
--
PHP General Mailing List (ht
result on my laptop for default script settings
(P4 2.66, 512mb ram)
20
loaded in: 1.3158s
please tell me what you think of this? if you like it i can email it to you
(as a php file)
--begin php code---
umin = $usermin;
$this->umax = $usermax;
$this->addresses = $add
Chris,
you can splice an array
http://www.php.net/manual/sv/function.array-splice.php
Jan Grafstrom
"Chris Winters" <[EMAIL PROTECTED]> skrev i meddelandet
news:[EMAIL PROTECTED]
> I'm having a bit of trouble...
>
> I have an array that consists of a string like this:
>
> string1\rstring2\rst
Have you tried searching string functions on http://www.php.net ?
Bogdan
Alexander Lindstedt wrote:
> If i want to find just a word in a variable, and then replace just that
> specific word... is there any simple way to do this?
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsub
Hi Marc,
try this:
$string = preg_replace("/^41/", "0", $string);
http://www.php.net/preg_replace
/ and / = delimiters
^ = start of string (line in multiline mode)
So, it translates as, "replace a leading 41 in $string with 0".
..or try the ereg function, which has already been mentioned.
J
Hi Dan,
maybe something like:
$newvariablethatwewantbetweenthetags = "Long variable!";
$string = preg_replace("/()(.*?)(<\/TAG>)/i",
\\1$newvariablethatwewantbetweenthetags\\2, $string));
There should be a " after and before the second part of that statement, but
my email proggy strips them.
19 matches
Mail list logo