Knowledge - Transfers
Escaping slashes and special characters in a string in PHP
function espControll($str,$encode=0)
{
if($encode==1)
{
if (!get_magic_quotes_gpc()) {
$str = addslashes(htmlentities($str,ENT_QUOTES,’cp1252′));
}
else
$str = htmlentities($str,ENT_QUOTES,’cp1252′);
}
else
{
if (!get_magic_quotes_gpc()) {
$str = addslashes($str);
}
}
return $str;
}
Categories
- Accounts, Finance
- Architect,Interior Design
- Automobiles
- Banking, Financial Services
- BPO, KPO
- Construction, Engineering
- Consultants
- Content, Journalism
- Engineering Design
- Export, Import
- Fashion
- Feng Shui
- Gadgets
- Global, Climate
- Healthcare, Medical
- Hotels, Restaurants
- HR, Admin
- Insurance
- IT, Software Services
- IT- Hardware
- Management
- Marketing, Advertising
- Media, Entertainment
- NGO
- Other
- Pharma, Biotech
- Photography
- Recipe
- Retail
- Site Engineering
- Teaching, Education
- Telecom
- Travel
- Trekking and Mountaineering
- TV, Films
- Web, Graphic Design
Calendar
February 2012 M T W T F S S « Jul 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
Add Widgets (Secondary Sidebar)
This is your Secondary Sidebar. Edit this content that appears here in the widgets panel by adding or removing widgets in the Secondary Sidebar area.




