How to update this array?


Posted on 16th Feb 2014 07:03 pm by admin

I am saving a string that looks this: username1, username2, username3...
into a single cell in a database table.
I am doing this so that when I retrieve that string using normal methods, I can turn it into an array.

Did you know?Explore Trending and Topic pages for more stories like this.
However, my question is: I will need to update that cell and add user names to it. and then save it back to the database.
I don't have any example code as I haven't started because I am not sure where to start.

This is what I was thinking.

It will start out with one username "username1".
That is what the original value will be. I then need to pull that info out (easy) and populate an array

Code: $original = 'username1';
$userArray = array($original);
I then need to turn around and add 'username2' to $userArray. and add it to the DB so it is formatted as username1, username2, username3..
No comments posted yet

Your Answer:

Login to answer
253 Like 8 Dislike
Previous forums Next forums
Other forums

ImageCreate()
When I create an image and add text to it I want my text to be replaced with a PNG image, because th

Detail Expenses Report by Cost Center
I would like to obtain a report out of SAP that shows a list of expenses by cost center that shows t

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

Show message after entering data
Hello Colleagues

I would like to display messages after entering the data example: "
dat

setcookie and isset($_COOKIE(name)) seem very finnicky.
I'm currently playing around with a user system with login and registration. I'm trying to use cooki

Problem related to Creation of PDF File?
Hi All,
I am facing a problem related to creation pdf file. when I am creating a pdf file of do

Sending an SMS Message with ASP.NET
Often times it may be a requirement for your web application to send an SMS message. Such examples w

New to mysqli library - Multiple query problem
Greetings,

I am writing a batch program that executes 3 queries on a single page. Using mysql

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

Create comparison matrix?
I want to create a comparison script for forum software and was wondering is there any tutorial or b

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash