If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Begginer on PHP, conceptual help

Hello, I'm trying to get into programming. I would like to know some basic concepts that I couldn't really find in youtube videos. How would I have a string and make it take out certain numbers and insert in into another string. For example.

// explode the string into array 'parts', as the string gets separated by '/' (delimiter) ...$parts=explode("/",$string);

// you are looking for the long number, which is $parts[4];// $parts[0] is "http:"// $parts[1] is nothing// $parts[2] is "steamcommunity.com"// $parts[3] is "profiles"// $parts[4] is "76561197997953878"

// so now build a new string ...

$string="add//profile//".$parts[4]."/";

echo "Here is your string: ".$string;

// ---------------------------------------------------// a shorter way to do the same thing.