Results 1 to 3 of 3

Thread: Get php variables from server

  1. #1
    Join Date
    Aug 2014

    Get php variables from server

    Is there a way to load variables from a php site while inside a mobile jquery app?

  2. #2
    Join Date
    Mar 2012
    That depends on what you mean by the question. If you mean "can PHP scripts be written to pass the contents of variables to the client", the answer is yes. If you mean "can a client (any client) directly access the PHP variables on the server" the answer is: of course not. What would lead you to ask such a question???

  3. #3
    Join Date
    Apr 2014
    ClientSide HTML
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    url: "",
    dataType: "json", //the return type data is jsonn
    success: function(data){ // <--- (data) is in json format
    //parse the json data

    ServerSide PHP

    $test = array();
    $test['test1'] = '1';
    $test['test2'] = '2';
    $test['test3'] = '3';

    echo json_encode($test);


Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center