Jump to content

Functions: Adding variables and editing values


lilwing

Recommended Posts

Is there a function that I can use to add/remove variables, and edit their values?

 

I was thinking fwrite, but I don't use that function very often, and I would have to probably create a custom function/class.

 

I don't have very much google magic today... just can't find what I am looking for.

Say I have an 'include file', which I include on a bunch of pages.

 

On this page, I assign variables to certain strings. Let's just say for example, that these are hyperlinks:

 

<?php

$link1 = "home";
$link2 = "fans";
$link3 = "switches";

?>

 

The reason it would be set up this way, is so that the owner of the page could change links around with the backend CMS application.

 

Anyway, say the owner wants to add a link... or remove a link... or change what it says. I am not exactly sure how to go about doing that. I could make the form, but I would have to come up with some kind of script that edits the values of the variables, and adds new links. That's what I need help with.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.