Jump to content

Alex

Staff Alumni
  • Posts

    2,467
  • Joined

  • Last visited

Everything posted by Alex

  1. There wouldn't be two different extensions if they were the same, would there? MySQLi The API is more or less the same, if that's what you're asking. With the addition of an Object-Oriented style.
  2. MySQLi is the MySQL Improved extension.
  3. Stick to one set. Use either all mysql_* or mysqli_*, don't mix and match them.
  4. http://gs.statcounter.com/
  5. How is it off? 2.5 * 16 is 40, and 2.5 pounds is 40 ounces.
  6. Yeah, PHP provides built-in support for this kind of thing: math. 1 pound = 16 ounces. $ounces = $pounds * 16; Or create a simple function. function pounds_to_ounces($pounds) { return $pounds * 16; }
  7. You don't need the second "WHERE". SELECT * FROM YBK_Ads WHERE UID = '{$_GET['UID']}' and delete = '0'
  8. Alex

    OOP PHP

    There's a difference between having a method be private in concept, and it actually being defined as private as far as the PHP engine is concerned. In the OP, common shows no intention to make the method private using keywords in the code. That being said, PHP 5 is no new invention, it has been out for over 6 years and you shouldn't be using PHP 4 anymore. Having to code for cross-compatibly with PHP 4 at this point is pretty ridiculous.
  9. Alex

    OOP PHP

    Just to nitpick, $this references the object you're current in, and has nothing to do with whether you access a method, or property for that matter. What PHP5 syntax is being used in that code?
  10. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=312191.0
  11. This is JavaScript, huge difference. I have moved the topic to the appropriate forum for you.
  12. +1
  13. This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=312178.0
  14. What makes you believe this belongs in the PHP Coding section?
  15. preg_match_all returns the same thing (see the documentation). Just echo what it returns. echo preg_match_all(...);
  16. Assuming you're using preg_match, it returns the number of matches.
  17. Well, you could still take a similar approach. I think creating a cron job is pretty unnecessary for a task like this. You could create a file like this: someimage.php - <?php header('Content-type: image/png'); readfile('images/' . ((date('i') % 10) + 1) . '.png'); ?> Then in your html for the image use: <img src="someimage.php" alt="" /> And if anyone copies the url, it will change also.
  18. You can use multiple AND clauses like that. That's obviously not the query causing the error (have you changed it?) because there isn't even a LIMIT in that query.
  19. I'm pretty sure the OP is looking for the actual source of the functions, not some documentation and examples. For that you'll have to get the PHP source here.
  20. <select onchange="window.location='http://'+this.value+'.website.com';"> <option value="at">Austria</option> <option value="be">Belgium</option> </select>
  21. You could fill the image with another color not used anywhere else in the image from the start (imagefill), then make that the transparent color.
  22. Apply it before you add the text.
  23. imagecolortransparent.
  24. Personally, I'd probably use the RecursiveDirectoryIterator.
  25. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=312079.0
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.