+ Reply to Thread
Results 1 to 3 of 3

Thread: Cannot use string offset as an array in...

  1. #1
    darylcarpo is offline x10Hosting Member darylcarpo is an unknown quantity at this point
    Join Date
    Oct 2008
    Posts
    21

    Cannot use string offset as an array in...

    Help here guys. Need help in my php... It says "Cannot use string offset as an array in..."
    PHP Code:
    $[0]k=date("l M d, Y h:i A",$items[$x]['timestamp']+$oss+18000)." GMT".$osh;
    $minute=floor((double)$items[$x]['duration']/60);
    $second=fmod((double)$items[$x]['duration'],60); 
    Actually that is part of the script in line 313...

  2. #2
    quantum1's Avatar
    quantum1 is offline x10Hosting Member quantum1 is an unknown quantity at this point
    Join Date
    Sep 2008
    Location
    near Nashville, TN
    Posts
    68

    Re: Cannot use string offset as an array in...

    Please show us the source code where you define the $items array. Also, a more complete description of the error and so forth is needed.
    Two rules of development:
    1) Computers work for people; People do not work for computers
    2) Maintainability is all that matters.

  3. #3
    Jake's Avatar
    Jake is offline Developer Jake is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Winona, MN
    Posts
    2,084

    Re: Cannot use string offset as an array in...

    first off whats $[0]k ? and second you don't have to cast those variables into doubles in php....
    Jake Omann | Developer
    █ 888-X10-9668 - jake[@]x10hosting.com
    x10Hosting - Giving Away Hosting Since 2004
    Premium Hosting | VPS Services

+ Reply to Thread

Similar Threads

  1. Recursive PHP array to Javascript array/object
    By Veridis in forum Programming Help
    Replies: 0
    Last Post: 04-16-2008, 02:55 AM
  2. [PHP] sorting 2-dimensional array by timestamp-key
    By bonzo meier in forum Programming Help
    Replies: 0
    Last Post: 02-19-2008, 04:28 PM
  3. help with db conversion?
    By moogyness in forum Scripts & 3rd Party Apps
    Replies: 5
    Last Post: 12-11-2007, 01:59 PM
  4. Can some1 tell me if this is the legal IF 2.0?
    By pensoftware in forum Computers & Technology
    Replies: 9
    Last Post: 04-05-2006, 12:33 PM
  5. Really Something Up
    By WeeRowan in forum Free Hosting
    Replies: 28
    Last Post: 12-19-2005, 05:49 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers