Toon posts:

PHP content retrieve wijzigen

Pagina: 1
Acties:

Verwijderd

Topicstarter
IK heb een content retrieve systeem dat ook daadwerkelijk content van een andere site afhaald.

Maar nu wil ik vershcillende tags wijzigen.

Voorbeeld :

Ik wil de juiste links aangeven.Dus wil ik inplaats van alle tags handmatig invullen iets bedenken waardoor ik voor alle link tag bijvoorbeeld www.test.nl kan zetten.

Dus ==> <a href="/test.html"> moet <a href="www.test.nl/test.html> en met str_replace heb ik het al gepropbeerd maar het lukt niet .

Iemand een suggestie ???????? B-)

  • _.Luke._
  • Registratie: September 2001
  • Laatst online: 26-07-2021
Hmmm hier een linkje..

str_replace ( what, with, from )

What is the string you want to replace.
With is what you want to put in those places.
From is the string of origin, where the search will happen.

So, if you want to replace the spaces in

$string = "my string 111111";

with the word SPACE, you can do:

str_replace ( " ", "SPACE", $string );

[Bron:]
http://www.php.net/manual/en/function.str-replace.php

Ik denk toch dat het met str_replace moet kunnen...
Let er dan wel op dat je de complete file in de string zet!

Anders kommie waarschijnlijk aan de reg-exp...

Trying is the first step towards faillure...