Help with text grabing.
Started on the old forum in July 2012 · view the original in the archive · old links redirect here
//users post example
$post = 'fb.com/sometext';
//here we remove what we dont want
//str_replace('THE TEXT YOU DONT WANT', 'TEXT YOU DO WANT(OR)LEAVE BLANK', $post);
$post = str_replace('fb.com/', '', $post);
//here we show new result which should display
//sometext
echo $post;
//
//
//
//
<?php
include ('Ghost');
if ($Post == true) {
echo '

alt='coding-talk.com!!' />';
echo 'Sharing Is Caring!';
} else {
echo '

alt='the username GHOST has been comprimised!' />';
echo 'OMG SOMEBODY HELP ME!!';
}
?>
maybe this will help
<?php
$var = parse_url("http://fb.com/xxx?q=pov");
print_r($var); // Array ( [scheme] => http [host] => fb.com [path] => /xxx [query] => q=pov )
PIMP-WAP.NET - PIMP YOUR MOBILE
MASTER-LAND.NET - WAPMASTERS LAND
Wintch wrote: 2) what if u want to get the last 3 letters of a word, eg "GHOST" and i want to get only the "OST" and/or the first 2 words also eg "GH"
I think this is just the thing u wanted: PHP.NET Function Substr
<?php
$rest = substr("ghost", -1); // returns "t"
$rest = substr("ghost", -2); // returns "st"
$rest = substr("ghost", -3, 1); // returns "o"
?>