View Single Post
Old 10-15-2009, 08:22 AM   #1 (permalink)
cachepl0x
That guy
 
cachepl0x's Avatar
 
Join Date: Sep 2009
Location: San Antonio, TX
Posts: 24
Thanks: 0
cachepl0x is on a distinguished road
Default Stumbled upon something here..

Well, I was looking through the PHP documentation, and I came across a neat function called parse_str. I was wondering, would it be wise to use this for storing, and using database details?

PHP Code:
$str "host=localhost&user=root&pass=pass&name=db_name";

parse_str($str); 
Then:

PHP Code:
echo "$host$user$pass$name"
Would output "localhost, root, pass, db_name."
cachepl0x is offline  
Reply With Quote