Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: preg_replace

Parašė Bencius· 2012 Gru. 29 19:12:06
#1

Sveiki, susidūriau su problema, nelabai suprantu funkcijos: preg_replace.
Turiu tokį kodą plugine:

if ( $item_class == 'twitter' ) {
			// Remove "Username: " from beginning of tweets
			$final = preg_replace('/([^:]+:\s)/', '', $final, 1 );
 
			// Add links to all @ mentions
			$final = preg_replace('/@([^\s]+)/', '<a href="http://twitter.com/$1">@$1</a>', $final );
 
			// Add links to all hash tags
			$final = preg_replace('/#([^\s]+)/', '<a href="http://twitter.com/search/%23$1">#$1</a>', $final );
 
			// I <3 Regular Expressions.
		}


Ir tokį vaizdą:

Ką man reikia padaryti:
*Pašalinti pirmąją eilutę (SoundCloud conversion to RSS provided by Cloud Flipper: [Web] – [Facebook] – [Donate!])
*Ištraukti papildomą informaciją iš soundcloude.

Galintys padėti labai prašau parašykite į skype: benasbauba

Ačiū, neliksiu skoloj.

Redagavo Bencius· 2013 Sau. 2 19:01:33