Good Coding Style in PHP + Other languages #15

Style 1.1: Use proper indenting

while ($x < $z) {    if ($a == 1)    {       echo 'A was equal to 1';  }   else    {       if ($b == 2)        {           //do something      }       else        {           //do something else     }   }}

1.2
while ($x < $z) { if ($a == 1) { echo 'A was equal to 1'; } else { if ($b == 2) { //do something } else { //do something else } }}

Style 2.1: Properly indent conditional statements. Always use braces, it will make later additions of more statements easier.

while ($x < $z) {   if ($a == 1)    {       echo 'A was equal to 1';  }   else    {       if ($b == 2)        {           //do something      }       else        {           //do something else     }   }}

Style 2.2

while ($x < $z) {   if ($a == 1) {      echo 'A was equal to 1';  } else {        if ($b == 2) {          //do something      } else {            //do something else     }   }}

3.1 Function Calls
No space between function names and parenthesis.

   $var = myFunction($x, $y);

3.2 Function declarations

Use braces properly, give meaningful names to the parameters, always return values from functions. Avoid printing/echoing inside functions.

function myFunction($province, $city = ''){   //indent all code inside here   return $result;}   

4. Use comments before a function. Also, use comments before a block [especially if it uses some difficult to understand logic]use PHPDoc style comments that may work like Javadoc to create documentation from your source files

/** *  short description of function * *   Optional more detailed description. * * @param $paramName - type - brief purpose *  @param ... *    ... *   @return type and description */

5. Use include_once or require_once instead of include or require to include a file that contains common variables, functions, classes.
6. Php tags: always use

  

instead of

  

7. to enclose strings use single quote ‘ ‘ rather than double quotes ” “. Try to use . to concate string variables. You can use double quote and put variables inside.

 $associative_array['name']; $var='My String';   $var2='Very... long... string... ' . $var . ' ...more string... ';  $sql="INSERT INTO mytable (field) VALUES ('$var')";

8. Follow some conventions for variable and function names

  • Class name start with uppercase letter. Each word should start with uppercase letter
  • Variable and function name may start with lower case letters. Then each word will start with a capital letter
  • give meaningful names to variables and functions
  • Do not make them too lengthy. I prefer less than 12-15 character names
  • Do not abbreviate words in variable or function names. Use $url or $articleUrl as variable names, not $URL or $articleURL as

From: http://sitestree.com/?p=4741
Categories:15
Tags:
Post Data:2006-08-07 13:22:40

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

IT Startup ideas #155

Some IT startup ideas

From: http://sitestree.com/?p=5338
Categories:155
Tags:
Post Data:2008-12-19 06:44:39

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

PHP Security – Guidelines #16

PHP Security – Guidelines

  • Do not store sensitive information in Cookies
  • Instead of cookies, store sensitive information in Sessions
  • Sessions can also be hacked though safer than cookies
  • PHP session id is pretty random; so in general this is not a problem.
  • Reducing the session security problem: determine current user is the one who originally initiated session. if not, deny access
  • Regenerate session ids after login, on initialization
  • Change the session variable name and the path to save [session_save_path(), session_name (“xyz”) ]
  • Reduce session runtime [session.gc_maxlifetime]
  • use SSL [force users to use SSL]
  • do not use .inc files and do not keep php code inside them
  • Do not use dynamic file path for require and include
  • Do not use relative file path [use absolute file path]
  • Do not trust user input to prevent XSS
  • use htmlspecialchars(). strip_tags(), htmlentities() on the user input
  • To prevent Cross-site Request Forgeries (CSRF), check $_SERVER [‘HTTP_REFERER’]
  • You may want to use token in your session to prevent CSRF. Re-authenticate for sensitive operations
  • When you use third party tools, do not install them in their default loation
  • When error situation occurs in your code, just stop
  • Use authorization to allow a user the minimal right he/she needs
  • Double check where you are using eval()
  • use mysql_real_escape_string() on the user provided data to be used in Databasequeries
  • Use prepared statements or stored procedures
  • Double verify the data types. do not accept string where the data has to be integer [ctype_digit()., filter_var() do not use is_int() and is_numeric()]
  • Keep log files and check your log files time to time
  • do not display detail error messages in your live site. But you can log the erros for your own checking
  • do not use standard login names such as administrator, root
  • do not put your administration module under folder named admin
  • You can even use a different file extension other than .php [but not .inc]
  • Stop spamming using your contact form. Validate email address. use filter_var()
  • encrypt sensitive information
  • initialize variables when first declared
  • Disable register_globals in php.ini
  • do not use $_REQUEST, instead use $_GET and $_POST
  • When developing use E_ALL to know all the possible errors. but turn off E_ALL in live site
  • Type Cast and verify data. Only allow the appropriate data type
  • use ctype_alnum(), ctype_alpha(), ctype_xdigit()
  • Use htmlspecialchars() and htmlentities() more than using strip_tags()
  • SQL escaping (to prevent SQL Injection): mysql_escape_string(), mysql_real_escape_string(), pg_escape_string(), pg_escape_bytea(), sqlite_escape_string()
  • to avoid double escaping use get_magic_quotes_gpc()
  • Session security technique: compare with the browser signature headers. if no match, destroy the session.
  • for shared hosting use the following two php.ini directives properly: open_basedir, safe_mode

From: http://sitestree.com/?p=5336
Categories:16
Tags:
Post Data:2013-05-05 00:07:23

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>

#Engineering: #Canada: #Job/Contract/Project: Any #Engineering: #Computer, #Electrical, #Electronics, #Civil, #Chemical, #Mechanical, #Naval, #Biomedical, and misc Engineering

Date Posted:2021-08-26 .Apply yourself, or submit others as candidates; Build a recruitment team to submit others as candidates; submit RFP to be considered for projects in future; Try to become a vendor so that you are asked to submit consultants/resources in future. If these work for you. This list is posted in this blog everyday provided there are new projects under the criteria

  1. construction-services-10004
  2. Prequalification of Mechanical & Electrical Contractors – Kincardine CT Scanner
  • air-conditioning-and-refrigeration-equipment-10016
  • MECHANICAL COOLING ADDITION
  • Supply And Installation Of Heating, Ventilation And Air Conditioning (Hvac) System Replacement, Electrical Upgrades
  • electrical-and-electronics-10006
  • Upgrade Electrical Panels – Tender Ready
  • BringIt Electrical Installation Project (RE-TENDER)
  • PEAK SHAVERS ELECTRICAL SWITCHGEAR EQUIPMENT SUPPLIER
  • fabricated-materials-10009
  • Mechanical Lock (21401-220001/A)
  • food-preparation-and-serving-equipment-10012
  • Electrical Upgrade
  • industrial-equipment-10014
  • REQUEST FOR PROPOSAL (RFP) for MECHANICAL & ELECTRICAL CONSULTANT SERVICES for FORT SASKATCHEWAN – CORRECTIONAL CENTRE – VARIOUS BUILDINGS – Heating Boilers Replacement
  • REQUEST FOR PROPOSAL (RFP) for MECHANICAL & ELECTRICAL CONSULTANT SERVICES for FORT SASKATCHEWAN – CORRECTIONAL CENTRE – VARIOUS BUILDINGS – Heating Boilers Replacement
  • machinery-and-tools-10015
  • Upgrade Electrical Panels – Tender Ready
  • architect-and-engineering-services-10048
  • RCMP Detachment Architecture & Engineering Services
  • Upgrade Electrical Panels – Tender Ready
  • Provision of Engineering Services for Prospect Park WTP – Ultraviolet Disinfection System Upgrade (HHACT)
  • Taxiways A, B, D & J Rehabilitation – Engineering Services
  • Completion of a Detailed Engineering Design for the Bal Harbour Sewage Pumping Station (PS) Electrical Upgrade
  • ENGINEERING SERVICES FOR DETAILED CONDITION SURVEYS AND DESIGN FOR VARIOUS STRUCTURES
  • Design engineering services Grading and Surfacing reconstruction of Highway No. 51 C.S. 51-01
  • educational-and-training-services-10043
  • One Pilot Instructor and one Combination Instructor Flight Engineer and Instructor Load Master (W0107-21XC39/A)
  • environmental-services-10050
  • Engineering Services for the Design of Former Rossville School Site Remediation
  • professional-administrative-and-management-support-services-10040
  • Engineering Services for the Design of Former Rossville School Site Remediation
  • Mechanical Consulting Services CBC Building – BMS Upgrade, Regina, Saskatchewan
  • quality-control-testing-inspection-and-technical-representative-services-10053
  • IPD Mechanical Contractor Services – RCMP Main Detachment Modern
  • research-and-development-r-d-10036
  • Engineering Consulting Services for Detailed Dam Break Flood Inundation Mapping
  • utilities-10041
  • Request for Proposal for Engineering Services – 2021/2022 Active Transportation Plan
  • undefined-10055
  • PWES/WS/ Mechanical Engineering Services-Kanata West Pumping Station
  • Keywords Used:engineer,civil,mechanical,electrical,electronics,mechatronics,naval,biomedical,computer engineer,software engineer,civil engineer,biomedical,electrical engineer,electronics engineer,mechanical engineer,metallurgical,chemical engineer,industrial engineer,communications engineer,quality assurance engineer,Aerospace engineer,aeronautical engineer,Engineering manager,Agricultural Engineer,Automotive Engineer,Environmental Engineer,Geological Engineer,Marine Engineer,Petroleum Engineer,Acoustic Engineer,Acoustic Engineer,Aerospace Engineer,Agricultural Engineer,Applied Engineer,Architectural Engineer,Audio Engineer,Automotive Engineer,Biomedical Engineer,Chemical Engineer,Civil Engineer,Computer Engineer,Electrical Engineer,Environmental Engineer,Industrial Engineer,Marine Engineer,Materials Science Engineer,Mechanical Engineer,Mechatronic Engineer,Mining and Geological Engineer,Molecular Engineer,Nanoengineering,Nuclear Engineer,Petroleum Engineer,Software Engineer,Structural Engineer,Telecommunications Engineer,Thermal Engineer,Transport Engineer,Vehicle Engineer,engineering

    #Canada: #IT Jobs:#Consultants, #Contractors, #Analysts, #Engineers, #Developers, #Technology Consultants, #IT-Consultants Opportunities2021-08-26

    Apply yourself, or submit others as a candidate, Build a recruitment team to submit others as a candidate, submit RFP to be considered for projects in future, Try to become a vendor so that you are asked to submit consultants/resources in future

    1. communications-detection-and-fibre-optics-10031
    2. Consulting Services – Fibre Optic Design
    3. edp-hardware-and-software-10034
    4. Asset Management Information System (AMIS) Consultant
    5. Drupal Based Cloud Hosted Web Content Management System
    6. PQR – Standing Offer for IT Management Consulting Services
    7. edp-and-office-equipment-maintenance-10035
    8. Drupal Based Cloud Hosted Web Content Management System
    9. electrical-and-electronics-10006
    10. Consultant – LAS – Assessment (Design & Construction Phase)
    11. Lighting System Upgrades – Consulting Services
    12. energy-10007
    13. Advocate Cost Consulting Services for 45 Sacré-Coeur Blvd. Project
    14. Prime Consulting Services – RH Coats – Podium and Curtain Wall Replacement
    15. industrial-equipment-10014
    16. REQUEST FOR PROPOSAL (RFP) for MECHANICAL & ELECTRICAL CONSULTANT SERVICES for FORT SASKATCHEWAN – CORRECTIONAL CENTRE – VARIOUS BUILDINGS – Heating Boilers Replacement
    17. REQUEST FOR PROPOSAL (RFP) for MECHANICAL & ELECTRICAL CONSULTANT SERVICES for FORT SASKATCHEWAN – CORRECTIONAL CENTRE – VARIOUS BUILDINGS – Heating Boilers Replacement
    18. machinery-and-tools-10015
    19. Consultant – LAS – Assessment (Design & Construction Phase)
    20. Consultant – Roof Replacement
    21. textiles-and-apparel-10028
    22. RFP #21.0054 Integrated Project Delivery Team – Turf Consultant and Turf Contractor for the Indoor Fieldhouse
    23. architect-and-engineering-services-10048
    24. Professional Consulting Service for Redevelopment of Old Ex Arena-80 Sinclair St
    25. Consultant – LAS – Assessment (Design & Construction Phase)
    26. educational-and-training-services-10043
    27. Space standards consultant for the university sector
    28. Medical Consulting Services for the Assured Income for the Severely Handicapped (AISH) Program for the of Alberta
    29. One Pilot Instructor and one Combination Instructor Flight Engineer and Instructor Load Master (W0107-21XC39/A)
    30. Assessment Consulting Service for the Assured Income for the Severely Handicapped (AISH) Program for the Province of Alberta
    31. environmental-services-10050
    32. Advance Contract Award Notice for Web Based Retirement Calculator Services
    33. financial-and-related-services-10038
    34. P01AD21429 – CONSULTING SERVICES FOR RETAIL STRATEGY DEVELOPMENT
    35. ERP CONSULTING SERVICES
    36. health-and-social-services-10052
    37. HCP Psychology Consultant Services
    38. Safety Advisory Consultant
    39. information-processing-and-related-telecommunications-services-10049
    40. PQR – Standing Offer for IT Management Consulting Services
    41. operation-of-government-owned-facilities-10039
    42. Professional Food Consulting Services (RE-POSTED)
    43. professional-administrative-and-management-support-services-10040
    44. Space standards consultant for the university sector
    45. Mechanical Consulting Services CBC Building – BMS Upgrade, Regina, Saskatchewan
    46. Professional Consulting Service for Redevelopment of Old Ex Arena-80 Sinclair St
    47. Asset Management Information System (AMIS) Consultant
    48. quality-control-testing-inspection-and-technical-representative-services-10053
    49. Consulting Services for Drone Inspection Studies of Halton Region Open and Closed Landfill Sites
    50. REQUEST FOR PROPOSAL (RFP) for THIRD PARTY MATERIAL TESTING CONSULTANT SERVICES for NEW EDMONTON HOSPITAL PROJECT – CAMPUS SITE WORKS
    51. research-and-development-r-d-10036
    52. Engineering Consulting Services for Detailed Dam Break Flood Inundation Mapping
    53. special-studies-and-analysis-not-r-d-10047
    54. Space standards consultant for the university sector
    55. Consulting Services for Feasibility Study and Public Benefit Review for a Vacant Home Tax in Halton Region
    56. Consulting Services for Landfill Infrastructure Condition Assessments at Halton Region Open and Closed Landfill Sites
    57. P01AD21429 – CONSULTING SERVICES FOR RETAIL STRATEGY DEVELOPMENT
    58. Professional Food Consulting Services (RE-POSTED)
    59. undefined-10055
    60. PT-2020-BUSF-259: CONSULTING SERVICES STORMWATER ENVIRONMENTAL COMPLIANCE APPROV
    61. Create sitemap with PHP #16

      From: http://sitestree.com/?p=5331
      Categories:16
      Tags:
      Post Data:2011-07-05 06:10:13

          Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
          (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
          In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
          <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
          8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
          Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
          Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>
      

      Code Example: Utilizing Web Services in PHP #16

      PHP code to grab the best provincial mortgage rate:function find_mortgaze_rate($url){ // create a new cURL resource   $ch = curl_init();  // set URL and other appropriate options    curl_setopt($ch, CURLOPT_URL, $url);    curl_setopt($ch, CURLOPT_USERPWD, "username:password"); curl_setopt($ch, CURLOPT_HEADER, 0);    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);        // grab URL and pass it to the browser  $result = curl_exec($ch);   $bestRates = json_decode($result, true);    return $bestRates[1][5][0]['rate']; // close cURL resource, and free up system resources    curl_close($ch);    return $bestMortgaze;    }//supply URL to ProvidingMortgazeRatesForEachProvinceForDifferentYearsAndType$bestMortgaze = find_mortgaze_rate($urlToTheWebService);
      Sample JavaScript Function to calculate the monthly mortgaze paymentfunction calculate(){    var rate = document.getElementById('txtRate').value;    var homePrice = document.getElementById('txtHomePrice').value;  var percentDown = document.getElementById('txtDownpaymentPercent').value;   var amortization = document.getElementById('amortization').value;   var monthlyPayment = can_mortgage_payment_purchase(homePrice, percentDown/100,  rate/100, amortization, 12, 1); document.getElementById('monthlyPayment').value = '$'+monthlyPayment.toFixed(2);}
      Calculator Form Code       
      Best 5 Year Fixed Rate:
      Home Price:
      Downpayment Percentage:
      Amortization: 25 Years 30 Years
      Mortgage Payment:

      From: http://sitestree.com/?p=5302
      Categories:16
      Tags:
      Post Data:2009-11-03 18:40:09

          Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
          (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
          In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
          <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
          8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
          Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
          Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>
      

      PHP Network Programming Related Functions #16

      What can you do with them? For example 1.

      • Asterisk (http://www.asterisk.org/) is a telephony/telecommunication/PBX system management software – itr must be using many of these functions.
      • An ISP (like shaw, mts) may write applications to monitor your modem/router activities, your bandwidth, or the activities in the wireless access points – all these will use a lot of PHP network functions
      • On the server side, for the ISPs, they may have software to control/operate/interact with the routers, collecting and displaying usage statistics, network statistics – all these applications can be written in PHP. These applications will also use a lot of PHP related network functions.

      From: http://sitestree.com/?p=5274
      Categories:16
      Tags:
      Post Data:2010-02-03 12:11:09

          Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
          (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
          In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
          <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
          8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
          Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
          Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>
      

      Stored Procedure: PHP & MySQL #16

      Stored Procedure: PHP & MySQL. Stored Procedures are new additions to MySQL 5. PHP has supports for Store Procedure as well (with some limitations).

      From: http://sitestree.com/?p=5263
      Categories:16
      Tags:
      Post Data:2009-10-27 05:05:14

          Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
          (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
          In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
          <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
          8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
          Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
          Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>
      

      PHP String Related Built in Functions #16

      Check the following string manipulation related functions in PHP. String manipulation is pretty common in Software Development (esp. in high level, even in low level applications say you are working with network protocols – you need to interpret/parse the protocol language). Memorizing library functions is always a good thing – it’s a matter of productivity. However, knowing more functions does not guarantee that you will be able to solve a programming problem. However, if you are good at solving problems in general (in programming in general), knowing functions will improve your productivity (may also help to maintain/improve quality of software indirectly).

      You will find many string related functions very useful such as:

      • trim, rtrim, ltrip, chop, and similar: You may use these functions on user inputs, on data from databases, on data to insert into databases, while comparing two strings.
      • Wordwrap: To wrap words to create consistent user interfaces
      • substr_ compare, substr_ count, substr_ replace, substr, strstr, strchr: You will find these functions very usefull. Mostly substring related.
      • htmlspecialchars, addslashes, stripslashes, stripcslashes, html_ entity_ decode, htmlentities, htmlspecialchars_ decode,htmlspecialchars: For storing/retrieving HTML data into/from databases.
      • echo, print, fprintf, sprintf, vprintf, vfprintf: To output string. Formatted, non-formatted.
      • strtok, split, implode, explode, chunk_split : These are for dividing and merging strings.
      • money_format, number_format: To output string in money or number format.
      • strnatcasecmp, strnatcmp, strncasecmp, strncmp, similar_text : String comparison related functions.
      • strtolower, strtoupper, ucfirst, ucwords, lcfirst: the names tell it all. Case conversion related.
      • md5_ file, md5, sha1_ file, sha1, crc32, crypt: encryption & related
      • sscanf: formatted input
      • addcslashes
      • addslashes
      • bin2hex
      • chop
      • chr
      • chunk_ split
      • convert_ cyr_ string
      • convert_ uudecode
      • convert_ uuencode
      • count_ chars
      • crc32
      • crypt
      • echo
      • explode
      • fprintf
      • get_ html_ translation_ table
      • hebrev
      • hebrevc
      • html_ entity_ decode
      • htmlentities
      • htmlspecialchars_ decode
      • htmlspecialchars
      • implode
      • join
      • lcfirst
      • levenshtein
      • localeconv
      • ltrim
      • md5_ file
      • md5
      • metaphone
      • money_ format
      • nl_ langinfo
      • nl2br
      • number_ format
      • ord
      • parse_ str
      • print
      • printf
      • quoted_ printable_ decode
      • quoted_ printable_ encode
      • quotemeta
      • rtrim
      • setlocale
      • sha1_ file
      • sha1
      • similar_ text
      • soundex
      • sprintf
      • sscanf
      • str_ getcsv
      • str_ ireplace
      • str_ pad
      • str_ repeat
      • str_ replace
      • str_ rot13
      • str_ shuffle
      • str_ split
      • str_ word_ count
      • strcasecmp
      • strchr
      • strcmp
      • strcoll
      • strcspn
      • strip_ tags
      • stripcslashes
      • stripos
      • stripslashes
      • stristr
      • strlen
      • strnatcasecmp
      • strnatcmp
      • strncasecmp
      • strncmp
      • strpbrk
      • strpos
      • strrchr
      • strrev
      • strripos
      • strrpos
      • strspn
      • strstr
      • strtok
      • strtolower
      • strtoupper
      • strtr
      • substr_ compare
      • substr_ count
      • substr_ replace
      • substr
      • trim
      • ucfirst
      • ucwords
      • vfprintf
      • vprintf
      • vsprintf
      • wordwrap

      From: http://sitestree.com/?p=5261
      Categories:16
      Tags:
      Post Data:2006-08-01 21:49:26

          Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
          (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
          In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
          <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
          8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
          Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
          Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>