lilwing Posted June 13, 2008 Share Posted June 13, 2008 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. Link to comment https://forums.phpfreaks.com/topic/110148-functions-adding-variables-and-editing-values/ Share on other sites More sharing options...
DarkWater Posted June 13, 2008 Share Posted June 13, 2008 Elaborate please. Link to comment https://forums.phpfreaks.com/topic/110148-functions-adding-variables-and-editing-values/#findComment-565259 Share on other sites More sharing options...
lilwing Posted June 13, 2008 Author Share Posted June 13, 2008 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. Link to comment https://forums.phpfreaks.com/topic/110148-functions-adding-variables-and-editing-values/#findComment-565280 Share on other sites More sharing options...
DarkWater Posted June 13, 2008 Share Posted June 13, 2008 Use a database instead. It's faster, easier to work with, and simpler to implement. Link to comment https://forums.phpfreaks.com/topic/110148-functions-adding-variables-and-editing-values/#findComment-565285 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.