$response = $client->get('http://httpbin.org/get');
$response = $client->delete('http://httpbin.org/delete');
$response = $client->head('http://httpbin.org/get');
$response = $client->options('http://httpbin.org/get');
$response = $client->patch('http://httpbin.org/patch');
$response = $client->post('http://httpbin.org/post');
$response = $client->put('http://httpbin.org/put');
$regexp = '/\[(.+?)\|(.+?)\]/';
$text = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit [image_1|Просто текст], sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in [image_2|Просто второй текст] reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. [image_3|Тестовый текст] Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.';
$result = preg_replace_callback($regexp, function ($input){
return '<img src="'.$input[1].'" alt="'.$input[2].'">';
}, $text);
echo $result;
$db = new PDO('...');
$stmt = $db->query('SELECT * FROM articles_categories');
$results = $stmt->fetchAll(PDO::FETCH_ASSOC);
record = mysqli_fetch_assoc($result)
. Измените на $record
/**
* Class A
*
* @method get_post (string $url)
*/
class A
{
}
@method static get_post (string $url)
@method $this get_post (string $url = '')
(Если возвращается класс, то $this заменить на название класса)public function UniqueUsers()
{
$count = (new DBworker())->CountUsers();
}
$posts = get_field('profession');
print_r($posts);