Prodjex Posted August 8, 2017 Posted August 8, 2017 The PHP function strtok splits a string one by one. In the example below I’m trying to split off everything after the ? in the URL. https://www.facebook.com/LiquidWebInc?fref=ts https://www.facebook.com/CocaColaUnitedStates?brand_redir=1 In PHP I was able to do this with the following: $facebookURL = 'https://www.facebook.com/LiquidWebInc?fref=ts'; $cocacolaURL = 'https://www.facebook.com/CocaColaUnitedStates?brand_redir=1'; $facebookURL = strtok($facebookURL, '?'); $cocacolaURL = strtok($cocacolaURL, '?'); Check out the demo here. The post PHP strtok appeared first on Kansas City Web Consulting | Kansas City Web Development. View the full article Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.