Code |
Context $nb_matches = preg_match_all($pattern, $contenu, $matches);
$moitie = $nb_matches / 2;
$contenu = preg_replace('#' . preg_quote($matches[0][$moitie - 1]) . '#', '$0{{#if ACCES::estConnecte()}}{{#else}}{{#endif}}', $contenu, 1, $count);
$article = array(
"AsArticle" => array(
"id" => "6672",
"langue_id" => "1",
"type" => "article",
"journal_id" => "85",
"pur_web" => "0",
"categorie_id" => "13",
"thematique_id" => "437",
"hot_prehome" => "0",
"edito_article_1_id" => null,
"edito_article_1_timing" => null,
"edito_article_2_id" => null,
"edito_article_2_timing" => null,
"edito_article_3_id" => null,
"edito_article_3_timing" => null,
"edito_article_4_id" => null,
"edito_article_4_timing" => null,
"edito_article_5_id" => null,
"edito_article_5_timing" => null,
"payant" => "0",
"mail_thematique" => null,
"titre" => "VIDEO - Coronavirus : les conseils du Docteur Charrié. ",
"titre_mep_accueil" => "",
"titre_mep_carrousel" => "",
"chapeau" => "<p>Alors que nous sommes passés en phase III de l'épidémie, des conseils en santé naturelle (rarement étayés et pas toujours désintéressés) se multiplient de manière aussi exponentielle que le coronavirus lui-même. Le docteur Charrié, que nous avons déjà eu l'occasion d'interroger (par exemple ici sur <a href="../../cancer/l-alimentation-contre-les-cancers-les-maladies-inflammatoires-et-auto-immunes" target="_blank">l'alimentation anti-cancer</a>) est un praticien en <a href="../../medecine/endobiogenie-les-patients-temoignent" target="_blank">endobiogénie </a>et un spécialiste reconnu des médecines naturelles en qui nous avons entièrement confiance. Nous partageons ici l'interview qu'il a accordé récemment à Denis Leroy pour la Webtv <a href="http://www.c17infos.fr/" target="_blank">C17 infos</a> de la Rochelle où il exerce. Il y livre nombre de conseils utiles pour faire face à ce nouveau virus (accompagnement de la fièvre, tisanes, nutrition, huiles essentielles...).</p>",
"texte" => "<p style="margin-bottom: 0cm; line-height: 0.49cm; widows: 0; orphans: 0;"><span style="color: #000000;"><span style="font-family: Times, serif;"><br /></span></span></p>",
"auteur" => "",
"auteur_id" => "3",
"url" => "",
"tarif" => "",
"petition_id" => "",
"petition_signatures" => "0",
"petition_url" => "",
"meta_url" => "video-coronavirus-les-conseils-du-docteur-charrie",
"meta_description" => "",
"meta_keywords" => "",
"meta_title" => "",
"publier" => "1",
"visible_webservice" => "0",
"articles_lies" => "",
"carousel_accueil_ids" => "",
"hot_petition" => "0",
"date_debut_publication" => "2020-03-18 00:00:00",
"tec_id" => null,
"ordre_article" => null,
"liens_ids" => "",
"modifie_le" => "0000-00-00 00:00:00",
"created" => "2020-03-18 17:19:38",
"modified" => "2020-03-27 12:05:33",
"balise_script" => null
),
"AsJournal" => array(
"id" => "85",
"langue_id" => "1",
"numero" => "77",
"titre" => "Alternative n°77",
"couverture" => "upload/images/AS77_une_w.jpg",
"pdf" => "alternative-sante-n-77.pdf",
"categories_ids" => "2,4,3,8,13,1,9,15,7,5,14,12",
"date_debut_publication" => "2020-03-11 00:00:00",
"sommaire" => "",
"seo_title" => "",
"seo_description" => ""
),
"AsThematique" => array(
"id" => "437",
"parent_id" => "0",
"flag_form_inscription" => "0",
"ordre" => "0",
"dolist_id" => null,
"emarsys_id" => null,
"modified" => "2020-03-27",
"id_langue" => "1",
"titre" => "Coronavirus",
"article_lie_id" => null,
"id_multilangues" => "437"
),
"AsCategorie" => array(
"id" => "13",
"ordre" => "10",
"gabarit" => "mosaique_4",
"gabarit_recherche" => "multi_4",
"gabarit_tous" => "mosaique_4",
"couleur" => "#4B0082",
"liaisons_articles" => "0",
"url_video" => "",
"meta_title" => "Stages et thérapies",
"meta_description" => "Les annonces des praticiens et enseignants qui vous ouvrent les portes de la santé",
"titre_page" => "VIDEOS",
"noindex" => "1",
"menu" => "0",
"articles_en_avant" => "",
"id_langue" => "1",
"titre" => "Vidéos",
"id_multilangues" => "13"
),
"AsAuteur" => array(
"id" => "3",
"nom" => "la rédaction",
"pseudo" => null,
"avatar" => null
),
"Media" => array(
array()
),
"AsTag" => array(
array(),
array()
),
"AsArticlesLies" => array(
array(),
array(),
array(),
array(),
array()
)
)
$contenu = "<p style="margin-bottom: 0cm; line-height: 0.49cm; widows: 0; orphans: 0;"><span style="color: #000000;"><span style="font-family: Times, serif;"><br /></span></span></p>"
$pattern = "#<p[^>]*>(.+)</p>#"
$matches = array(
array(
"<p style="margin-bottom: 0cm; line-height: 0.49cm; widows: 0; orphans: 0;"><span style="color: #000000;"><span style="font-family: Times, serif;"><br /></span></span></p>"
),
array(
"<span style="color: #000000;"><span style="font-family: Times, serif;"><br /></span></span>"
)
)
$nb_matches = 1
$moitie = 0.5
$count = null
preg_replace - [internal]:??
ArticlesHelper::contenu_avec_pub() - CORE/plugins/plugin_as/views/helpers/articles.php:38
ArticlesHelper::contenu_article() - CORE/plugins/plugin_as/views/helpers/articles.php:8
include - APP/views/plugins/plugin_as/default/articles/article.ctp:265
View::_render() - CORE/cake/libs/view/view.php:766
View::render() - CORE/cake/libs/view/view.php:445
Controller::render() - CORE/cake/libs/controller/controller.php:909
AppController::render() - APP/app_controller.php:158
Dispatcher::_invoke() - CORE/cake/dispatcher.php:207
Dispatcher::dispatch() - CORE/cake/dispatcher.php:171
[main] - APP/webroot/index.php:87