Skip to content

Instantly share code, notes, and snippets.

@stefanpejcic
Created September 22, 2019 09:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stefanpejcic/c767695fe85d6455e317313423f132ef to your computer and use it in GitHub Desktop.
Save stefanpejcic/c767695fe85d6455e317313423f132ef to your computer and use it in GitHub Desktop.
Code used in the video tutorial https://youtu.be/CbJu7MNjfTk
<?php
$statement1="the tree";
$statement2=" is growing";
$combination=$statement1;
$combination .=$statement2;
echo ucfirst ($combination);
echo ucwords ($combination);
echo strtolower ($combination);
echo strtoupper ($combination);
echo substr ($combination, 5, 10);
echo strpos ($combination, "tree");
echo strchr($combination, "i");
echo strlen ($combination);
echo strstr ($combination, "tree");
echo str_repeat ($combination, 2);
echo str_replace ("tree", "plant", $combination);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment