{
  "id": "07",
  "content": [
    {
      "type": "heading",
      "text": "Strings & Common Operations"
    },
    {
      "type": "text",
      "html": "Concatenate with <code>.</code>. Interpolation works in double quotes."
    },
    {
      "type": "text",
      "html": "<pre><code>&lt;?php\n $name = 'Xavier';\n echo 'Hello ' . $name;\n echo \"Hello $name\";\n</code></pre>"
    },
    {
      "type": "text",
      "html": "Useful functions: <code>strlen</code>, <code>strtoupper</code>, <code>substr</code>, <code>str_replace</code>, <code>preg_match</code>."
    }
  ],
  "quiz": {
    "questions": [
      {
        "id": "q1",
        "type": "single",
        "text": "String concatenation operator in PHP is:",
        "options": [
          {
            "id": "a",
            "text": "."
          },
          {
            "id": "b",
            "text": "+"
          },
          {
            "id": "c",
            "text": "&"
          }
        ],
        "correct": [
          "a"
        ]
      },
      {
        "id": "q2",
        "type": "single",
        "text": "Which function performs regex match?",
        "options": [
          {
            "id": "a",
            "text": "preg_match"
          },
          {
            "id": "b",
            "text": "match_regex"
          },
          {
            "id": "c",
            "text": "strfind"
          }
        ],
        "correct": [
          "a"
        ]
      }
    ]
  }
}