Bonjour,

Je bloque sur quelque chose qui sera surement simple pour vous. Je n'arrive pas à passer une variable dans ma fonction surement à cause que dans cette function, il y a un object.


Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
 
getAnalyticsDatas("2011-09-27", "2011-10-27", "Last30DaysLastMonth_");
 
function getAnalyticsDatas($FromDate, $ToDate, $Prefixe)
{
 
		// date firmat is YYYY-MM-DD
		$analytics->setDateRange($FromDate, $ToDate);
 
		//get visits
		$Prefixe.$get_visits = $analytics->get_visits();
 
		//get bounces
		$Prefixe.$get_bounces = $analytics->get_bounces();
 
		//get visitors
		$Prefixe.$get_visitors = $analytics->get_visitors();
 
		//get newVisits
		$Prefixe.$get_newVisits = $analytics->get_newVisits();
 
		//get pageviews
		$Prefixe.$get_pageviews = $analytics->get_pageviews();
 
		//get timeOnSite
		$Prefixe.$get_timeOnSite = $analytics->get_timeOnSite();
 
}
?>