Date: 11/30/99
- Next message: kev: "[PHP3] 4000 chars max for LONG ?? (Oracle 8)"
- Previous message: Michael: "Re: [PHP3] Opening a new browser window, not using JS"
- Maybe in reply to: William Bailey: "[PHP3] Regex fun :)"
- Next in thread: William Bailey: "Re: [PHP3] Regex fun :)"
- Reply: William Bailey: "Re: [PHP3] Regex fun :)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> I need help!!!
> i have a string like so
> $string = "<select name=seleckbox
> size=1>\n<option>one\n<option>two\n</option>";
> and i need to insert "\n<option>Any" between "...size=1>" and
> "\n<opti...".
> i have been trying for ages to get the correct ereg_replace
> code but i have now got a hugh headache.
> the select name and size value are not constant.
It's really hard to tell what else is going on around
setting the above select box. But one avenue you
can explore is the following:
$selectBoxName = "bob"
$selectBoxSize = 10;
$string = "<select name=\"$selectBoxName\"
size=\"$selectBoxSize\">\n<option>one\n
<option>two\n</option>";
And just dynamically modify those two variables
in your code. You have to already have the variables
you are going to replace there in order to actually do
the ereg_replace you are hoping to find.
HTH
Chris
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: kev: "[PHP3] 4000 chars max for LONG ?? (Oracle 8)"
- Previous message: Michael: "Re: [PHP3] Opening a new browser window, not using JS"
- Maybe in reply to: William Bailey: "[PHP3] Regex fun :)"
- Next in thread: William Bailey: "Re: [PHP3] Regex fun :)"
- Reply: William Bailey: "Re: [PHP3] Regex fun :)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

