<h4>Example 1</h4>\r
<p>To alter a text to lowercase:\r
<pre class="code">\r
- $str = 'Î\91Ï\81Ï\87αίο ΠνεÏ\8dμα';\r
+ $str = 'Ã\8eâ\80\98Ã\8f�Ã\8fâ\80¡Ã\8e±Ã\8e¯Ã\8e¿ Ã\8e Ã\8e½Ã\8eµÃ\8f�Ã\8e¼Ã\8e±';\r
echo $strtolower($str);\r
</pre></p>\r
\r
<h4>Example 2</h4>\r
<p>To alter a text to uppercase:\r
<pre class="code">\r
- $str = 'Î\91Ï\81Ï\87αίο ΠνεÏ\8dμα';\r
+ $str = 'Ã\8eâ\80\98Ã\8f�Ã\8fâ\80¡Ã\8e±Ã\8e¯Ã\8e¿ Ã\8e Ã\8e½Ã\8eµÃ\8f�Ã\8e¼Ã\8e±';\r
echo $strtoupper($str);\r
</pre></p>\r
\r
<h4>Example 3</h4>\r
<p>To find the middle character of a string:\r
<pre class="code">\r
- $str = 'Î\91Ï\81Ï\87αίο ΠνεÏ\8dμα';\r
+ $str = 'Ã\8eâ\80\98Ã\8f�Ã\8fâ\80¡Ã\8e±Ã\8e¯Ã\8e¿ Ã\8e Ã\8e½Ã\8eµÃ\8f�Ã\8e¼Ã\8e±';\r
$mid = $strlen;\r
echo $strpos($mid, $str);\r
</pre></p>\r
<h4>Example 4</h4>\r
<p>To check if the string has the appropriate length:\r
<pre class="code">\r
- $str = 'Î\91Ï\81Ï\87αίο ΠνεÏ\8dμα';\r
+ $str = 'Ã\8eâ\80\98Ã\8f�Ã\8fâ\80¡Ã\8e±Ã\8e¯Ã\8e¿ Ã\8e Ã\8e½Ã\8eµÃ\8f�Ã\8e¼Ã\8e±';\r
$title = validate_length($str, 40);\r
//now the title is safe to insert into the db\r
</pre></p>\r
<h3><a name="var-base_href"></a>17.3 $_base_href</h3>\r
<h4>Description</h4>\r
<p><kbd>constant string $_base_href</kbd></p>\r
- <p>The full URL to ATutor's base installation. Supports both regular and SSL protocols. Example: <kbd>http://myserver.org/files/ATutor/</kbd>.</p>\r
+ <p>The full URL to the base href of the current page, an equivalence of the "href" attribute value in the page html <base> tag. Supports both regular and SSL protocols. Example: <kbd>http://myserver.org/files/ATutor/</kbd>.</p>\r
\r
<h4>Location</h4>\r
<p><kbd>`include/lib/constants.inc.php`</kbd></p>\r
<h3><a name="var-base_path"></a>17.4 $_base_path</h3>\r
<h4>Description</h4>\r
<p><kbd>constant string $_base_path</kbd></p>\r
- <p>The full absolute path to ATutor's base installation. Example: <kbd>/files/ATutor/</kbd>.</p>\r
+ <p>Extracted from $_base_href, the full absolute base path of the current page. Example: <kbd>/files/ATutor/</kbd>.</p>\r
\r
<h4>Location</h4>\r
<p><kbd>`include/lib/constants.inc.php`</kbd></p>\r
\r
<p>Result:\r
<pre class="code">\r
-The second month in French is: f憝rier\r
+The second month in French is: f�rier\r
</pre></p>\r
\r
<h3><a name="fn-addslashes"></a>18.5 $addslashes()</h3>\r