Hi, I'm running two arrays, the first one gives the quote (in red), the second (grey), who the quote was by. Safari, seems to be the only browser unable to show the second quote correctly, it only shows a single letter (although I only have ie, safari, firefox and opera) Why would this be? Is it a JavScript bug or do I have a Safari setting issue? the website is teamcherwell.com domdom
you should use JSON for this - basically JSON is javascript object notation. var quotes = [ { "quote": "The quick Brown Fox jumps over the lazy dog", "author": "Harold Pitman" }, { "quote": "Some objects in javascript are also arrays!", "author": "Dimitar" } ]; // same key: alert(quotes[1]['quote']); // Some objects in javascript are also arrays! alert(quotes[1]['author']); // Dimitar PHP: can't not match this way. a piece of advice: do not use the constructor to make a new array, just do it direct. var foo = new Array(); -> var foo = []; var foo = [1,2,3,4,5]; good luck learning js