PHP - Output and String HandlingWhat does the escape sequence \r do inside a PHP double-quoted string?AInserts a tab spaceBInserts a backslashCInserts a new lineDInserts a carriage returnCheck Answer
Step-by-Step SolutionSolution:Step 1: Recall escape sequences meaning\n is new line, \t is tab, \r is carriage return, \\ is backslash.Step 2: Match \r to its function\r moves the cursor to the beginning of the line (carriage return).Final Answer:Inserts a carriage return -> Option DQuick Check:\r = carriage return [OK]Quick Trick: Remember \r returns cursor to line start [OK]Common Mistakes:Mixing \r with \n (new line)Thinking \r inserts tabConfusing \r with backslash
Master "Output and String Handling" in PHP9 interactive learning modes - each teaches the same concept differentlyLearnWhyDeepVisualTryChallengeProjectRecallTime
More PHP Quizzes Arrays - Multidimensional arrays - Quiz 14medium Arrays - Array search functions - Quiz 10hard Conditional Statements - Switch statement execution - Quiz 12easy Operators - Why operators matter - Quiz 10hard Output and String Handling - Printf and sprintf formatting - Quiz 11easy Output and String Handling - String interpolation in double quotes - Quiz 15hard PHP Basics and Execution Model - Comments in PHP - Quiz 13medium Type Handling - Type coercion in operations - Quiz 1easy Type Handling - Settype for changing types - Quiz 15hard Variables and Data Types - Variable declaration with dollar sign - Quiz 10hard