Jump to content


  • Content Count

  • Joined

  • Last visited

  • Days Won


chhorn last won the day on April 29

chhorn had the most liked content!

Community Reputation

2 Neutral

About chhorn

  • Rank

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. chhorn

    Why use json_encode() on a string

    so you can interact with software that uses JSON as exchange format.
  2. Download PHPMailer, read the MySQLi Tutorial on www.php.net and start coding.
  3. chhorn


    You should learn Websockets.
  4. chhorn

    Need Help

    On the line before, just count them. count(open_paranthesis) === count(closing_paranthesis)
  5. chhorn

    Update to database

    The database wrapper is not part of php-core so you have to completely debug that or ask the developer if it's not you.
  6. <?php $json = '[{"foo": {"bar": 123}}]'; $array = json_decode($json, true); $threelevelsdeep = $array[0]['foo']['bar']; echo $threelevelsdeep;
  7. If you get a "blank page" you should first have a look in the error.log of your server.
  8. chhorn

    How do I access an array outside of if?

    Doesn't matter. It is returned, you just don't look at it. Open the webdeveloper console and switch to the network tab.
  9. So whats the problem then? If he entered the data, you store it, you show it.
  10. chhorn

    Query needed, thanks!

    yeah, try something then?
  11. So your statement is invalid, check for quotes. Also you are building an SQL injection vulnerability, so everybody can easily delete your database. Prepared Statements would solve both problems, just have a research for it.
  12. chhorn

    Transform array

    just another variant: $myarray = [ 'articles' => [ 'href' => 'http://admin.contenta.com/api/articles'], 'blocks' => [ 'href' => 'http://admin.contenta.com/api/blocks'], 'categories' => [ 'href' => 'http://admin.contenta.com/api/categories'] ]; print_r(array_combine(array_keys($myarray), array_column($myarray, 'href')));
  13. Start with a research for `php mysql tutorial` and present your attempts.
  14. chhorn

    Help for merging php code (easy)

    Why not just trying something first?
  15. chhorn

    Help for merging php code (easy)

    Place the first code before the second, then use the function output for string concatanation https://www.php.net/manual/en/language.operators.string.php

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.