AW: [PHP] Parsing Strings

2008-12-05 Thread Konrad Priemer
Hi,

Jason wrote:
> I have a string that is: Jason Slack
> and I want it broken at the space so i get Jason and then Slack

explode or split can do this.

$array = explode(" ", "Jason Slack");

Array
(
[0] => Jason
[1] => Slack
)

Greetings from Stuttgart

Conny


---
Firma Konrad Priemer
Onlinedienste & Webdesign

Kirchheimer Straße 116, D-70619 Stuttgart
Tel. 0711-50420416, FAX 0711-50420417, VOIP 0711-50888660
eMail: mailto:[EMAIL PROTECTED] - Internet:
http://www.cp-onlinedienste.de
---
Aktuelles Projekt: http://www.tierische-events.de - Veranstaltungen für
(oder mit) Mensch, Hund, Katze und Pferd

 

__ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3667
(20081205) __

E-Mail wurde geprüft mit ESET NOD32 Antivirus.

http://www.eset.com
 


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



AW: AW: [PHP] Parsing Strings

2008-12-05 Thread Konrad Priemer
Hi,

On Sa 06.12.2008 01:30 Jason wrote:

> Can you explain how to do an address now into City, State, Zip
> Like: cortland, ny 13045

Test this:

$string = "cortland, ny 13045";
$search = array(", ", ","); # if there is no space after the comma, we make
this ;-)
$replace = array(" ", " ");
$newString = str_replace($search, $replace, $string);
$array = explode(" ", $newString);

--
Old String: cortland, ny 13045
New String: cortland ny 13045

Array
(
[0] => cortland
[1] => ny
[2] => 13045
)
---

Regards from Stuttgart

Conny


PS: Sorry about my perfect english
 

__ Hinweis von ESET NOD32 Antivirus, Signaturdatenbank-Version 3667
(20081205) __

E-Mail wurde gepruft mit ESET NOD32 Antivirus.

http://www.eset.com
 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



AW: [PHP] Parsing Strings

2008-12-05 Thread Konrad Priemer
Oups, sorry

 

mistake by copy & paste ;-)

 

On Sa 06.12.2008 01:30 Jason wrote:

 

> Can you explain how to do an address now into City, State, Zip

> Like: cortland, ny 13045

 

 

$string = "cortland, ny 13045";

$search = array(", ", ",");

$replace = array(" ", " ");

$newString = str_replace($search, $replace, $string); $array = explode(" ",
$newString);

 

 

Regards from Stuttgart

 

Conny

 

 

PS: Sorry about my perfect english



[PHP] Get Remote-Image

2008-07-30 Thread Konrad Priemer
Moin,

 

kann mir mal wer auf die Sprünge helfen, ich bekomme es gerade nicht
geregelt ein Image "on-the-fly" von einem Remote-Host per fsockopen auf
meinen Server zu ziehen.

Irgendwo hab ich da voll die Blockade ;)

 

Mein "nichtfunktionierender" Versuch:

 

...

...

$out = "GET ".." HTTP/1.0\r\nHost:
".$this->host."\r\nUser-Agent: GetWiki for WordPress\r\n\r\n";

$fp = fsockopen($this->host, $this->port, $errno, $errstr, 30);

$File = fopen(,"wb"); 

fwrite( $File, $out );

fclose($File);

fclose($fp);

...

...

 

THX und Grüße

 

Conny