1
0
mirror of synced 2024-12-14 23:26:04 +03:00
doctrine2/manual/codes/Coding standards - Coding Style - Strings.php

19 lines
430 B
PHP
Raw Normal View History

2006-10-01 17:58:19 +04:00
<?php
// literal string
$string = 'something';
// string contains apostrophes
$sql = "SELECT id, name FROM people WHERE name = 'Fred' OR name = 'Susan'";
// variable substitution
$greeting = "Hello $name, welcome back!";
// concatenation
$framework = 'Doctrine' . ' ORM ' . 'Framework';
// concatenation line breaking
$sql = "SELECT id, name FROM user "
. "WHERE name = ? "
. "ORDER BY name ASC";