Pages
Labels
- Bisnis (1)
- CIT Scripts - Financore (5)
- Cokelat (3)
- MySQL (2)
- PHP (23)
- PT Comment Indonesia (10)
- SQL Query (2)
- SQL Server 2000 (4)
- SQL Server 2005 (4)
- Tips - Tricks Cokelat (2)
Link List
- Code Igniter Indonesia
- MySQL Reference Manuals
- MySQL Tutorial
- SQL Developer
- 9 Useful jQuery Calendar and Date Picker Plugins For Web Designers
- 10 Powerful AJAZ jQuery File Uploaders
- 35 Useful jQuery Plugins for Slideshows, Graphs and Text Effects
- 30 jQuery Calendar Date Picker Plugins
- jQuery
- Web Developers Notes
- SQL Copy MySQL Table
- Natural Cooking Club Indonesia
- Aneka Resep Praline - Sedap Sekejap
- Resep Cokelat
- Pastry and Bakery
- Peluang Bisnis Hotspot
- Billing Hospot
- JpGraph
- Zend Developer Zone
- MySQL Tutorials and Others
- W3 School
- Open Source Projects
str_replace : menghapus semua karakter spasi
syntax :
str_replace("string_expression1", "string_expression2", "string_expression3")
Contoh :
<?php
$text = "Jakarta Adalah Ibukota Indonesia";
$hasil = str_replace(" ","", $text);
$rawstring = "Your replacement is a pleasure to have!";
$malestr = str_replace("replacement", "son", $rawstring);
echo "Sebelum = " . $text . "<br>";
echo "Sesudah = " . $hasil . "<br><br>";
echo "Sebelum : Son = " . $rawstring . "<br>";
echo "Sesudah : Son = " . $malestr . "<br>";
?>
Output :
Sebelum = Jakarta Adalah Ibukota Indonesia
Sesudah = JakartaAdalahIbukotaIndonesia
Sebelum : Son = Your replacement is a pleasure to have!
Sesudah : Son = Your son is a pleasure to have!
Labels: PHP