[ create a new paste ] login | about

Link: http://codepad.org/1L1wHUDj    [ raw code | output | fork ]

PHP, pasted on Apr 28:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
<?php

$texto = "codepad is an online compiler/interpreter, and 
a simple collaboration tool.Paste your code below, and 
codepad will run it and give you a short URL you can use
 to share it in chat or email.";


$resumo  = substr($texto, 0, 30);
$address = strtolower(trim(preg_replace('/[^a-zA-Z0-9]+/', '-', $resumo), '-'));

echo $address;

?>


Output:
1
codepad-is-an-online-compiler


Create a new paste based on this one


Comments: