01-27-2009, 04:55 PM
|
#1 (permalink)
|
|
The Contributor
Join Date: Nov 2007
Posts: 41
Thanks: 24
|
need help on editing php files with arrays with php
not sure if this is the most efficient way of doing this but i have a file called myData.php that has the following:
PHP Code:
<?php
$data = array(
array(
"theURL" => "http://www.google.com",
"title" => "Google",
"someText" => "Google Search Engine",
"moreText" => "Google Search Engine. Find whatever you want on the web.",
"thumbnail" => "tn_google.jpg"
),
array(
"theURL" => "http://www.yahoo.com",
"title" => "Yahoo",
"someText" => "Yahoo Search Engine",
"moreText" => "Yahoo Search Engine. Find whatever you want on the web.",
"thumbnail" => "tn_yahoo.jpg"
),
array(
"theURL" => "http://www.msn.com",
"title" => "MSN",
"someText" => "MSN Search Engine",
"moreText" => "MSN Search Engine. Find whatever you want on the web.",
"thumbnail" => "tn_msn.jpg"
),
);
?>
so I want to create a web interface to edit those values so i dont have some random person editing it and breaking it. So what is the best route for accomplishing this. Should I be using file_get_contents? or is there something better?
__________________
"Things you can get access to, you should never memorize." -Albert Einstein
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -Benjamin Franklin
|
|
|
|