View Full Version : PHP help
razor
December 14th, 2000, 06:46
okay i pulled this array data[8] from a database. it is an interger. i want to add 1 to it. how would i do that? i have tried this but it gives me a parse error:
$views = data[8] + 1;
DanceTrend
December 14th, 2000, 07:29
$data[8]++;
if it doesn't work:
$data = $data[8];
$data++;
razor
December 14th, 2000, 15:39
$update = $data[8]+1; is what i used to fix it, data[8]++ doesnt work. the only problem is it wont go any farther than one when i reload the script. what it is a counter of the views of a page and then it inserts it into a database.
[Edited by razor on 12-14-2000 at 04:41 PM]
Powered by vBulletin® Version 4.1.7 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.