• Hopefully this is an easy one. Being a noob, I just can’t find anything on it.

    Here’s the code I’m trying to fix:

    function quitdrinkingplugin_install(){
       $quitdrinking[0] = time(); // Date Quit
       $quitdrinking[1] = "10"; // drinks per day
       $quitdrinking[2] = "20"; // drinks in bottle (refer to notes)
       $quitdrinking[3] = "15.00"; // Price of bottle
       $quitdrinking[4] = "I quit drinking on: %quitdate% and have been free for: %quitcounter%. I've not had %drinksnotdrunk% drinks and have saved %quitmoney% as well as gaining %quithours% hours of life.";
       $quitdrinking[5] = "0";
    
       update_option("quitdrinkingplugin", $quitdrinking);
       }

    For the below line of code, I’m trying to put in line break after some of the variables and periods.

    $quitdrinking[4] = "I quit drinking on: %quitdate% and have been free for: %quitcounter%. I've not had %drinksnotdrunk% drinks and have saved %quitmoney% as well as gaining %quithours% hours of life.";

    Any suggestions? Thx. in advance.

  • The topic ‘Add line breaks in wordpress function with quotes text’ is closed to new replies.