Skip to content
David Kittell
David Kittell

Application & System: Development / Integration / Orchestration

  • Services
    • Application Development
    • Online Application Integration
  • Code
  • Online Tools
  • Tech Support
David Kittell

Application & System: Development / Integration / Orchestration

Remove duplicates in a string array

Posted on September 1, 2015October 26, 2015 By David Kittell
//error_reporting(E_ALL);
//ini_set('display_errors', 1);

echo "<p>Original:<br/>".$_GET['input']."</p>";
$pieces = explode(",", $_GET['input']);
$result = array_unique($pieces);
echo "<p>Updated:<br/>";
foreach($result as $print) {
    echo  "$print,";
}
echo "</p>";
Originally Posted on September 1, 2015
Last Updated on October 26, 2015
All information on this site is shared with the intention to help. Before any source code or program is ran on a production (non-development) system it is suggested you test it and fully understand what it is doing not just what it appears it is doing. I accept no responsibility for any damage you may do with this code.

Related

Code PHP

Post navigation

Previous post
Next post

Related Posts

JavaScript – Time Conversion – Millisecond (Execution/Run Time) To Human Readable

Posted on December 26, 2018December 26, 2018

Sometimes when you are looking at execution time you want to make it easier to report the amount of time. The script below will help. And a full example is below All information on this site is shared with the intention to help. Before any source code or program is…

Read More

PowerShell Extract Zip Files

Posted on September 11, 2015May 8, 2018

function Expand-ZipFile([string]$File, [string]$Destination) #The targets to run. { $Shell = new-object -com shell.application # Get the name of the Zip file $Zip = $Shell.NameSpace($File) #Expand/Extract each file from the zip file foreach($Item in $Zip.items()) { $Shell.Namespace($Destination).copyhere($Item) } } Expand-ZipFile –File "C:\file.zip" –Destination "C:\tempfile" Reference: http://www.howtogeek.com/tips/how-to-extract-zip-files-using-powershell/ Originally Posted on September 11,…

Read More

GitLab – Folder Permissions Fix

Posted on November 29, 2016

If you’ve ran into a directory permissions problem with GitLab before this may be helpful. The code below is mostly based on GitLab documentation – https://docs.gitlab.com/omnibus/settings/configuration.html # Holds repositories directory sudo chown -R -v git:root /var/opt/gitlab/git-data sudo chmod -R -v 0700 /var/opt/gitlab/git-data # Holds git repositories sudo chown -R -v…

Read More

Code

Top Posts & Pages

  • PowerShell - Rename Pictures to Image Taken
  • Front Page
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions

Recent Posts

  • Javascript – Digital Clock with Style
  • BASH – Web Ping Log
  • BASH – Picture / Video File Name Manipulation
  • Mac OSX Terminal – Create SSH Key
  • Bash – Rename Picture

Top Posts

  • PowerShell - Rename Pictures to Image Taken
  • C# - Start/Stop/Restart Services
  • MacPorts / HomeBrew - Rip CD tracks from terminal
  • PowerShell - Show File Extensions
  • Open On Screen Keyboard (OSK)
  • SQLite - Auto-Increment / Auto Generate GUID
©2025 David Kittell | WordPress Theme by SuperbThemes