) if present $html = preg_replace('/^<\?php\s*\?>/i', '', $html); // ═══════════════════════════════════════ // INJECT CLOUD BRIDGE SCRIPT // This overrides save()/load()/auth functions // to use MySQL instead of localStorage // ═══════════════════════════════════════ $cloudBridge = <<<'JSBRIDGE' JSBRIDGE; // Inject bridge script BEFORE the closing tag $html = str_replace('', $cloudBridge . "\n", $html); // Output the modified HTML echo $html;