Facebook Page
Twitter
RSS
+ Reply to Thread
Page 2 of 2 FirstFirst 12
Results 11 to 13 of 13
  1. Pessimist Singularitarian
    MHB Coder
    MHB Math Helper
    MHB Ambassador
    MarkFL's Avatar
    Status
    Offline
    Join Date
    Feb 2012
    Location
    St. Augustine, FL.
    Posts
    10,984
    Thanks
    31,324 times
    Thanked
    26,188 times
    Thank/Post
    2.384
    Trophies
    20 Highscores
    Awards
    MHB Statistics Award (2016)  

MHB Calculus Award (2016)  

MHB Pre-University Math Award (2016)  

MHB Model Helper Award (2015)  

MHB Calculus Award (2015)
    #11
    Hello, and welcome to MHB, arinmath!

    It appears to me you wish to display some $\LaTeX$ on your web page. You don't need to use PHP to do this, you can simply put the code(s) wrapped in the dollar tags as text within the appropriate HTML elements.

  2. MHB Apprentice

    Status
    Offline
    Join Date
    Oct 2016
    Posts
    2
    Thanks
    0 times
    Thanked
    0 times
    #12
    Thank you for your reply.
    I want to create some multiple choice questions. The questions are kept in an array. Suppose the array contains 100 questions. Some of the questions contains Latex equations. I want to display only 10 questions randomly. In that situation, it is essential to use php.
    So please help in this regard.
    With regards,
    Arindam Bandyopadhyay
    India.

  3. Pessimist Singularitarian
    MHB Coder
    MHB Math Helper
    MHB Ambassador
    MarkFL's Avatar
    Status
    Offline
    Join Date
    Feb 2012
    Location
    St. Augustine, FL.
    Posts
    10,984
    Thanks
    31,324 times
    Thanked
    26,188 times
    Thank/Post
    2.384
    Trophies
    20 Highscores
    Awards
    MHB Statistics Award (2016)  

MHB Calculus Award (2016)  

MHB Pre-University Math Award (2016)  

MHB Model Helper Award (2015)  

MHB Calculus Award (2015)
    #13
    What I would likely do to create and easily maintain a bank of randomly chosen questions is to store them in one long string, delimited by line breaks, e.q.:



    And then explode this string into an array:



    Then, use a while loop to randomly choose questions from the array (keeping track of questions already selected so they are only selected once). As the questions are chosen, wrap them in whatever HTML you want along with $\LaTeX$ tags, and concatenate them into a single string. Then echo this string to the page in the appropriate place.

Similar Threads

  1. Testing LaTeX (powered by MathJax)
    By Chris L T521 in forum LaTeX Help and Discussion
    Replies: 20
    Last Post: August 22nd, 2014, 19:14
  2. [SOLVED] Mathjax and adding in our own commands
    By dwsmith in forum Questions, Comments, and Feedback
    Replies: 1
    Last Post: September 16th, 2013, 08:34
  3. [SOLVED] RH and LH Double-Quotes in MathJax
    By Ackbach in forum LaTeX Help and Discussion
    Replies: 5
    Last Post: August 8th, 2012, 09:16

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Math Help Boards